R Code Example for Neural Networks

December 12, 2010
By
R Code Example for Neural Networks

See also NEURAL NETWORKS. In this past June's issue of R journal, the 'neuralnet' package was introduced. I had recently been familiar with utilizing neural networks via the 'nnet' package (see my post on Data Mining in A Nutshell) but I find the neuralnet package more useful because it will allow you to actually plot...

Read more »

Load R packages…directly from cran if needed

December 12, 2010
By
Load R packages…directly from cran if needed

R works in many ways and on many different OSes which is great, but it also means that if you share a piece of code the recipient may need to install packages to make it work. One thing that I do (adapted from a trick my friend Paul Jin showed me) is use the following

Read more »

White Bull, An Algorithm in R

December 11, 2010
By
White Bull, An Algorithm in R

Algorithms are curious creatures. They behave in a very predictable way. They do as they are told and do it the same way every time. What they lack in imagination, they make up in reliability. You cannot talk an algorithm into saying something it's not...

Read more »

Keeping R libraries in sync between different computers using Dropbox

December 11, 2010
By

We have a few computers including laptops in our network which all use R (r-project.org) for statistics. We use Dropbox to keep all our files in sync and we are all on ubuntu. The problem was that we wanted to keep our R installations in sync so we don’t have different libraries and settings everywhere.

Read more »

Keeping R libraries in sync between different computers using Dropbox

December 11, 2010
By

We have a few computers including laptops in our network which all use R (r-project.org) for statistics. We use Dropbox to keep all our files in sync and we are all on ubuntu. The problem was that we wanted to keep our R installations in sy...

Read more »

socialR: Reproducible Research & Notebook integration with R

December 10, 2010
By
socialR: Reproducible Research & Notebook integration with R

I’ve created an R package that uses social media tools for reproducible research.  The goal of the package is this: whenever I run a code, output figures are automatically added to my figure repository (Flickr), linked to the timestamped version of the code that produced them in the code repository.  Figures should be tagged by

Read more »

Confidence bands with lattice and R

December 10, 2010
By
Confidence bands with lattice and R

If you use lattice with R, and you need to plot confidence limits in your graphic, then panel.smoother and panel.quantile from latticeExtra will help you with this task. These functions internally calculate the error bounds and use panel.polygon from lattice. If you need to plot your own confidence limits, then you have to define a

Read more »

R at Google

December 10, 2010
By
R at Google

Last night, Ni Wang and Max Lin from Google gave a talk to the New York R User Group discussing how R is used inside Google. About 150 R developers attended the meeting. Ni and Max said that R is used very widely at Google and is an integral part of the analytics work they

Read more »

New edition of “R Companion to Applied Regression” – by John Fox and Sandy Weisberg

December 10, 2010
By
New edition of “R Companion to Applied Regression” – by John Fox and Sandy Weisberg

Just two hours ago, Professor John Fox has announced on the R-help mailing list of a new (second) edition to his book “An R and S Plus Companion to Applied Regression”, now title . “An R Companion to Applied Regression, Second Edition”. John Fox is (very) well known in the R community for many contributions to R, including the...

Read more »

LaTeX Typesetting – Document Structure

December 10, 2010
By
LaTeX Typesetting – Document Structure

Following on from the initial post about creating a document using LaTeX we need to consider the structure of the document, i.e. headings and page layout. Fast Tube by Casper Document Class The document class is a template that specifies the appearance of different components of a document, e.g. the font and size of headings. The most commonly

Read more »

An R interface to the Google Prediction API

December 10, 2010
By

An the New York R User Group* last night, 100 R users heard Ni Wang and Max Lin talk explain how "R is one of the important tools used by analysts and engineers at Google for analyzing data". During the talk, Lin revealed that Google plans to make "R more integrated with internal machine learning algorithms and infrastructure", and...

Read more »

An R interface to the Google Prediction API

December 10, 2010
By

An the New York R User Group* last night, 100 R users heard Ni Wang and Max Lin talk explain how "R is one of the important tools used by analysts and engineers at Google for analyzing data". During the talk, Lin revealed that Google plans to make "R more integrated with internal machine learning algorithms and infrastructure", and...

Read more »

Interesting volatility measurement

December 10, 2010
By

Long time ago I stumbled across interesting volatility measurement at quantifiableedges.blogspot.com. The idea is following: take 3-day historical volatility of S&P 500 index and divide that by 10-day historical volatility. Then mark all points which are less that 0.25 and measure the volatility of 3 following days. On average, the volatility of following 3 days

Read more »

R: Basic R Skills – Splitting and Plotting

December 10, 2010
By
R: Basic R Skills – Splitting and Plotting

I am giving a short R course next year, so I am going to make a series of blog posts to help get my thoughts and example code in order. The aim is to introduce people with little or no experience of R to the language with self contained examp...

Read more »

R: Basic R Skills – Splitting and Plotting

December 10, 2010
By
R: Basic R Skills – Splitting and Plotting

I am giving a short R course next year, so I am going to make a series of blog posts to help get my thoughts and example code in order. The aim is to introduce people with little or no experience of R to the language with self contained examp...

Read more »

Once again, chart critics and graph gurus welcome

December 10, 2010
By
Once again, chart critics and graph gurus welcome

HOW TO DISPLAY A LINE PLOT WITH COUNT INFORMATION? In a previously-mentioned paper Sharad and your DSN editor are writing up, there is the above line plot with points. The area of each point shows the count of observations. It’s done in R with ggplot2 (hooray for Hadley). We generally like this type of plot,

Read more »

Truly random [again]

December 9, 2010
By
Truly random [again]

“The measurement outputs contain at the 99% confidence level 42 new random bits. This is a much stronger statement than passing or not passing statistical tests, which merely indicate that no obvious non-random patterns are present.” arXiv:0911.3427 As often, I bought La Recherche in the station newsagent for the wrong reason! The cover of the

Read more »

Illustrating CFAs – Graphviz

December 9, 2010
By
Illustrating CFAs – Graphviz

So after yesterdays post you probably ran this fancy new confirmatory factor analysis (CFA) – showed your friends all the cool fit stats and… nothing. As important as doing things right is being able to let others know that. For CFA the method of choice to illustrate the connections between variables are path diagrams these

Read more »

Choosing colors for your charts with RColorBrewer

December 9, 2010
By
Choosing colors for your charts with RColorBrewer

If you're creating a bar chart in R, how do you decide what colors the bars should be? Or if you're creating an image plot, what range of images should you use? The colors you choose can not only affect the viewer's interpretation of the graphic, it can also determine its aesthetic appeal, too. That's where the RColorBrewer package...

Read more »

Choosing colors for your charts with RColorBrewer

December 9, 2010
By
Choosing colors for your charts with RColorBrewer

If you're creating a bar chart in R, how do you decide what colors the bars should be? Or if you're creating an image plot, what range of images should you use? The colors you choose can not only affect the viewer's interpretation of the graphic, it can also determine its aesthetic appeal, too. That's where the RColorBrewer package...

Read more »

Learning R

December 9, 2010
By
Learning R

I have had to be primarily self taught in R and I still have a long way to go.  I like R way better than SAS but the documentation in SAS is way better (that's what happens when you pay people to do it full time).  However, there are innumera...

Read more »

New version of solaR (0.21)

December 9, 2010
By
New version of solaR (0.21)

The version 0.21 of the solaR package is now available at CRAN. This package provides a set of calculation methods of solar radiation and performance of photovoltaic systems. The package has been uploaded to CRAN under the GPL-3 license. solaR is now able to calculate from both daily and sub-daily irradiation values. Besides, there are

Read more »

All together now – Confirmatory Factor Analysis in R

December 8, 2010
By

Describing multivariate data is not easy. Especially, if you think that statisticians have not developed any new tools after the ANOVA and principal component analysis (PCA). For social and experimental scientists the most important new technique are structural equation models that combine measurement models (that substitute reliability analysis and PCA) and structural models (that substitute

Read more »

Slides from Revolution R: 100% R and More

December 8, 2010
By

If you missed today's webcast on Revolution R Enterprise: 100% R and more, the slides from the presentation are now available for download, and a replay of the webcast (in WMV format) will be available at that same link very soon. And if you missed some of the links I mentioned in the presentation, here they are for your...

Read more »

Slides from Revolution R: 100% R and More

December 8, 2010
By

If you missed today's webcast on Revolution R Enterprise: 100% R and more, the slides from the presentation are now available for download, and a replay of the webcast (in WMV format) will be available at that same link very soon. And if you missed some of the links I mentioned in the presentation, here they are for your...

Read more »

Interesting Posts at Rational Past Time Related to My Previous Strike Zone Map Post

December 8, 2010
By
Interesting Posts at Rational Past Time Related to My Previous Strike Zone Map Post

J-Doug at Rational Pastime has some cool posts looking at umpire strike zones at his site (and cross-posted at Beyond the Boxscore). I was curious about this issue as well with some work I've been doing here in the office (which I'll refrain from talk...

Read more »

New paper: Survival analysis

December 8, 2010
By
New paper: Survival analysis

Each year I try to carry out some statistical consultancy to give me experience in other areas of statistics and also to provide teaching examples. Last Christmas I was approached by a paediatric consultant from the RVI who wanted to carry out prospective survival analysis. The consultant, Bruce  Jaffray, had performed Nissen fundoplication surgery on

Read more »

cumsum ( rnorm(50), lend="butt", lwd=12, type="h" ) Cumulative…

December 8, 2010
By
cumsum ( rnorm(50), lend="butt", lwd=12, type="h" )
Cumulative…

cumsum ( rnorm(50), lend="butt", lwd=12, type="h" ) Cumulative sum of 50 draws from a normal distribution. File this under mysteries of the Central Limit Theorem.

Read more »

Fantasy football (oops, soccer)

December 8, 2010
By
Fantasy football (oops, soccer)

Recently a colleague asked if I could use R/statistics to form a dream soccer team from a pool of soccer players, given basic player information like name, club, cost, points.The idea is to form a team with your preferred configuration of number of def...

Read more »