free range statistics

I write about applications of data and analytical techniques like statistical modelling and simulation to real-world situations. I show how to access and use data, and provide examples of analytical products and the code that produced them.

Recent posts

Shiny in production for commercial clients

21 December 2020

Shiny can be an effective platform to quickly build data-intensive web applications that otherwise would not be commercially viable. The rationale for using Shiny at the right time is convenience, cost, and statistical and graphics power.

Animated map of World War I UK ship positions

05 December 2020

An animated map of UK Royal Navy ship locations during World War I.

Reproduce analysis of a political attitudes experiment

14 November 2020

I reproduce the analysis of data from a recently published experiment on the impact on Australians' and New Zealanders' attitudes to overseas aid of being exposed to writing about Chinese aid in the Pacific. Along the way I muse about the Table 2 fallacy, and try to avoid it while still using multiple imputation, bootstrap and adjusting for covariates to slightly improve the original analysis.

Hamlet, data models, interaction graphs and other cool stuff

11 October 2020

I play around with Hamlet's text to set it up for easy data analysis. Hamlet is awesome, this post is really just an excuse to spend time with it; but it does perhaps start to put together something useful about data models for text.

Facebook survey data for the Covid-19 Symptom Data Challenge

04 October 2020

Two huge surveys of Facebook users seem to provide valuable new information on how the world is responding to Covid-19, but I am very unsure about whether they have potential to enable earlier detection of outbreaks.

Free text in surveys - important issues in the 2017 New Zealand Election Study

26 September 2020

I try out biterm topic modelling on a free text question in the 2017 New Zealand Election Study about the most important issue in the election.

Trying out Processing

13 September 2020

I have a go at using the Processing programming language, which was developed to help graphic designers but has a broad bunch of potential applications. While Processing proper sits on top of Java, there's a handy implementation in JavaScript.

Mixture distributions and reporting times for Covid-19 deaths in Florida

06 September 2020

I look at some unusual data where the median was higher than the mode, and show how to model it in Stan as a mixture of two negative binomial distributions.

Time series cross validation of effective reproduction number nowcasts

29 August 2020

I confront past nowcasts of effective reproduction number for Covid-19 in Victoria with the best hindsight estimate, and confirm that the nowcasts lag change in the 7-14 days leading up to the time they are made.

Lines of best fit

23 August 2020

I have a go at synthesising data to re-create a controversial and much-criticised chart that used ordinary least squares to fit a line relating university subjects' costs per student to the number of students in each subject.