# Monthly Archives: September 2011

## Word Cloud from Blog RSS

September 2, 2011
By

Crazy busy  - no time to blog recently. Time enough for pretty pictures based upon previous words though...(thanks http://www.wordle.net).

## Fix missing dates with R

September 2, 2011
By

I have data on user access to a website. This log file (helpdesk log.csv) just contains the date of access, and how many accesses were counted. It would look like this:Date hits13-07-2011 214-07-2011 116-07-2011 317-07-2011 4...As you can see, for day...

## Density curve of histogram plot in R

September 1, 2011
By

Ref: http://casoilresource.lawr.ucdavis.edu/drupal/book/export/html/23 To add density curve on a histogram, like the green curve above, use code below:#plot the distributionhist(slope, breaks=1000, freq=F, main=main, xlab="Slope Value (percent)", ...

## Le Monde puzzle [#738]

September 1, 2011
By

The Friday puzzle in Le Monde this week is about “friendly perfect squares”, namely perfect squares x2>10 and y2>10 with the same number of digits and such that, when drifting all digits of x2 by the same value a (modulo 10), one recovers y2. For instance, 121 is “friend” with 676. Here is my R

## Interactive graphics for data analysis

September 1, 2011
By

I got a copy of Martin Theus and Simon Urbanek’s Interactive Graphics for Data Analysis a couple of years ago, whence it’s been sat on my bookshelf. Since I’ve recently become a self-proclaimed expert on interactive graphics I thought it was about time I read the thing. Which is exactly what I did last weekend

## Add text aligned to legend in R plot

September 1, 2011
By

What I meant is to add text on a R plot when there is already legend on it. Like the left plot in above figure, another piece of text was put exactly below the legend "Pearson'r ...RMSE = 1.9". Here is the code for that: l=legend("topleft", paste(...

## An enhanced Kaplan-Meier plot, updated

September 1, 2011
By

I’ve updated the R code for the enhanced K-M plot to include additions and improvements by Gil Thomas and Mark Cowley. Thanks fellows for the feedback and updates. http://statbandit.wordpress.com/2011/03/08/an-enhanced-kaplan-meier-plot/

## Help showcase R with the "Applications in Business" contest

September 1, 2011
By

By showing off what R can do for businesses, you could share in \$20,000 in prizes from Revolution Analytics. R is already used in many companies around the world, but many people who could benefit from using R still don't know what it is or how it could help them. That's why we're reaching out to the expertise of...

## Forecasting In R: A New Hope with AR(10)

September 1, 2011
By

In our last post we determined that the ARIMA(2,2,2) model was just plain not going to work for us.  Although i didn't show its residuals failed to pass the acf and pacf test for white noise and the mean of its residuals was greater than three whe...

## S&P 500 Returns

September 1, 2011
By

I'll begin with a familiar image:That plot shows the closing values of the S&P 500 index from 1990 until today. It's a useful representation -- at a glance, you can tell when the market rose and fell. That said, it does have some problems: we're...