Publications by andrew

Comment of the week

27.06.2014

This one, from DominikM: Really great, the simple random intercept – random slope mixed model I did yesterday now runs at least an order of magnitude faster after installing RStan 2.3 this morning. You are doing an awesome job, thanks a lot! The post Comment of the week appeared first on Statistical Modeling, Causal Inference, and Social Scienc...

793 sym

Stan goes to the World Cup

13.07.2014

I thought it would be fun to fit a simple model in Stan to estimate the abilities of the teams in the World Cup, then I could post everything here on the blog, the whole story of the analysis from beginning to end, showing the results of spending a couple hours on a data analysis. It didn’t work so well, but I guess that’s part of the story t...

26862 sym 14 img

Comrades Marathon: A Race for Geriatrics?

22.07.2014

It has been suggested that the average Comrades Marathon runner is gradually getting older. As an “average runner” myself, I will not deny that I am personally getting older. But, what I really mean is that the average age of all runners taking part in this great event is gradually increasing. This is not just an idle hypothesis: it is suppor...

5668 sym R (5052 sym/9 pcs) 4 img

Commitments of Traders: Moves in the Last Week

09.08.2014

In my previous post I gave some background information on the Commitments of Traders report along with a selection of summary plots. One of the more interesting pieces of information that one can glean from these reports is the shift in trading sentiment from week to week. Below is a plot reflecting the relative change in the number of long and s...

2388 sym R (203 sym/1 pcs) 2 img

Plotting Flows with riverplot

14.08.2014

I have been looking for an intuitive way to plot flows or connections between states in a process. An obvious choice is a Sankey Plot, but I could not find a satisfactory implementation in R… until I read the riverplot post by January Weiner. His riverplot package does precisely what I am need. Getting your data into the right format is a sligh...

2812 sym R (1227 sym/5 pcs) 2 img

What does CNN have in common with Carmen Reinhart, Kenneth Rogoff, and Richard Tol: They all made foolish, embarrassing errors that would never have happened had they been using R Markdown

19.09.2014

Rachel Cunliffe shares this delight: Had the CNN team used an integrated statistical analysis and display system such as R Markdown, nobody would’ve needed to type in the numbers by hand, and the above embarrassment never would’ve occurred. And CNN should be embarrassed about this: it’s much worse than a simple typo, as it indicates they d...

3859 sym 2 img

Creating More Effective Graphs

04.11.2014

A few years ago I ordered a copy of the 2005 edition of Creating More Effective Graphs by Naomi Robbins. Somewhat shamefully I admit that the book got buried beneath a deluge of papers and other books and never received the attention it was due. Having recently discovered the R Graph Catalog, which implements many of the plots from the book using...

1709 sym R (763 sym/1 pcs) 4 img

Zacks Data on Quandl

08.11.2014

Data from Zacks Research have just been made available on Quandl. Registered Quandl users have free preview access to these data, which cover the following: Earnings Estimates: forward-looking consensus forecasts; Earnings Surprises: estimated future and actual historical earnings; Earnings Announcements: predictions for earnings announcement...

3368 sym R (2379 sym/5 pcs) 4 img

Simulating Intricate Branching Patterns with DLA

16.12.2014

Manfred Schroeder’s book Fractals, Chaos, Power Laws is a fruitful source of interesting topics and projects. He gives a thorough description of Diffusion-Limited Aggregation (DLA) as a technique for simulating physical processes which produce intricate branching structures. Examples, as illustrated below, include Lichtenberg Figures, dielectri...

4236 sym R (6164 sym/5 pcs) 6 img

Downloading Option Chain Data from Google Finance in R: An Update

13.01.2015

I recently read an article which showed how to download Option Chain data from Google Finance using R. Interestingly, that article appears to be a close adaption of another article which does the same thing using Python. While playing around with the code from these articles I noticed a couple of things that might benefit from minor tweaks. Befor...

3459 sym R (2467 sym/6 pcs) 4 img