Monthly Archives: March 2011

How to backtest a strategy in R

March 26, 2011
By

This is the third post in the Backtesting in Excel and R series and it will show how to backtest a simple strategy in R.  It will follow the 4 steps Damian outlined in his post on how to backtest a simple strategy in Excel.Step 1: Get the dataThe ...

Read more »

How to backtest a strategy in R

March 26, 2011
By

This is the third post in the Backtesting in Excel and R series and it will show how to backtest a simple strategy in R.  It will follow the 4 steps Damian outlined in his post on how to backtest a simple strategy in Excel.Step 1: Get the dataThe ...

Read more »

Le Monde puzzle [#7]

March 26, 2011
By
Le Monde puzzle [#7]

The mathematical puzzle from the weekend edition of Le Monde from a few weeks ago was not too hard to solve by induction but my R code failed miserably! The puzzle was as follows: A calculator is broken in such a way that it starts by exhibiting 0, then pressing 4, 6 or 0 keeps

Read more »

A Request for Foursquare Data

March 25, 2011
By

I’m trying to collect data sets that showcase how the classical statistical distributions appear in modern contexts. I’ve already got some data that shows how the gamma distribution appears in video game scores, and now I’m hoping to find an example where the exponential distribution

Read more »

Aquamacs 2.2 and ESS

March 25, 2011
By

News of the latest release of Aquamacs, version 2.2, appeared this week in my echo area. Given the opportunity to procrastinate, I dropped everything and upgraded; returning to work, I noticed that the version of ESS shipped with Aquamacs 2.2 is ESS 5...

Read more »

R inside Qt: A simple RInside application

March 25, 2011
By
R inside Qt: A simple RInside application

The RInside package makes it pretty simple and straightforward to embed R, the wonderful statistical programming environment and language, inside of a C++ application. This uses both the robust embedding API provided by R itself, and the higher-level...

Read more »

Because it’s Friday: Do Celebrities Follow the Half Your Age Plus Seven Rule?

March 25, 2011
By
celeb small

Remember the Dating Equation from a while back, that formula that determines the socially acceptable bounds for the age of a female companion given the age of the male partner? Well, the crack data analysis team at Revolution Analytics decided to take the 100 hottest celebrity couples of 2010, and create a scatterplot of the couple's ages (using R),...

Read more »

Loading CSV with Date and Time into Zoo in R

March 25, 2011
By

Sometimes you are facing time series which has both date and time property in one column in CSV file. In this case you need to pass additional parameter into read.zoo function:   View Code RSPLUS1 z <- read.zoo("/path/to/file/test.csv&...

Read more »

Grey’s Anatomy Network of Sexual Relations

March 25, 2011
By

This all began with an introductory presentation about social network analysis to a group of medical students.  What better way to grab their attention than with attractive, fake doctors having sex on television?  Naturally this led to the dense network … Continue reading →

Read more »

MCMC with errors

March 25, 2011
By
MCMC with errors

I received this email last week from Ian Langmore, a postdoc in Columbia: I’m looking for literature on a subject and can’t find it:  I have a Metropolis sampler where the acceptance probability is evaluated with some error.  This error is not simply error in evaluation of the target density.  It occurs due to the

Read more »