Publications by andrew

Package party: Conditional Inference Trees

21.05.2013

I am going to be using the party package for one of my projects, so I spent some time today familiarising myself with it. The details of the package are described in Hothorn, T., Hornik, K., & Zeileis, A. (1999). “party: A Laboratory for Recursive Partytioning” which is available from CRAN. The main workhorse of the package is ctree, so that ...

6679 sym R (5841 sym/19 pcs) 8 img

xkcd Style Bubble Plot

23.05.2013

A package was recently released to generate plots in the style of xkcd using R. Being a big fan of the cartoon, I could not resist trying it out. So I set out to produce something like one of Hans Rosling’s bubble plots. First I needed some data. Spoilt for choice. I scraped some population data broken down by country and retained only the c...

1937 sym R (2643 sym/6 pcs) 2 img

Package MatchIt: Balancing experimental data

23.05.2013

A balanced experimental design is one in which the distribution of the covariates is the same in both the control and treatment groups. However, although achievable in an experimental scenario, for observational data this ideal is seldom attained. The MatchIt package provides a means of pre-processing data so that the treated and control groups...

4462 sym R (2888 sym/9 pcs) 4 img

Analysis of Cable Morning Trade Strategy

29.05.2013

A couple of years ago I implemented an automated trading algorithm for a strategy called the “Cable Morning Trade”. The basis of the strategy is the range of GBPUSD during the interval 05:00 to 09:00 London time. Two buy stop orders are placed 5 points above the highest high for this period; two sell stop orders are placed 5 points below the ...

3485 sym 8 img

Comrades Marathon Attrition Rate

07.06.2013

It is a bit of a mission to get the complete data set for this year’s Comrades Marathon. The full results are easily accessible, but come as an HTML file. Embedded in this file are links to the splits for individual athletes. So with a bit of scripting wizardry it is also possible to download the HTML files for each of the individual athletes. ...

5236 sym 6 img 1 tbl

Robust logistic regression

07.06.2013

Corey Yanofsky writes: In your work, you’ve robustificated logistic regression by having the logit function saturate at, e.g., 0.01 and 0.99, instead of 0 and 1. Do you have any thoughts on a sensible setting for the saturation values? My intuition suggests that it has something to do with proportion of outliers expected in the data (assuming ...

1654 sym

Medal Allocations at the Comrades Marathon

09.06.2013

Following up on my previous post regarding attrition rates at Comrades Marathon 2013, here are the statistics I have gathered for medal allocations. There is some interesting history behind the Comrades Marathon medals. For reference, the medals are allocated as follows: Gold medals to the first ten finishers in the men’s race and the ladies�...

1137 sym 2 img

Job opening! Come work with us!

18.06.2013

Postdoctoral position in statistical modeling of social networks A full-time postdoctoral position is available beginning Fall 2014 in the research group of Tian Zheng and Andrew Gelman working on statistical analysis and modeling of social network data, in close cooperation with our experimental collaborators. Four key papers of this project so ...

2422 sym

The Green Number Effect

18.06.2013

Following up on a suggestion from my previous post, here are the statistics for medal count versus age. Every point on the plot is the number (see colour legend on right) of athletes who have achieved a given number of medals by a particular age. There is clear evidence of a Green Number Effect: many people hang on for ten medals and then pack i...

1160 sym 4 img

Job openings at conservative political analytics firm!

21.06.2013

After posting that announcement about Civis Analytics, I wrote, “If a reconstituted Romney Analytics team is hiring, let me know and I’ll post that ad too.” Adam Schaeffer obliged: Not sure about Romney’s team, but Evolving Strategies is looking for sharp folks who lean right: Evolving Strategies is a political communications research f...

2860 sym 2 img