Publications by Robert

Giving R the strengths of Stata

19.12.2013

This is not a partisan post that extols the virtues of one software package over another. I love Stata and R and use them both all the time. They each have strengths and weaknesses and if I could only take one to the desert island, I’d find it hard to choose. For me, the greatest unique selling point in Stata is the flexibility of the macros. I...

5966 sym R (1235 sym/17 pcs) 6 img

A room full of Julians

22.01.2014

Despite winter rain, I was delighted to head uptown last week to Skills Matter on the old Goswell Road for the first ever London Julia meetup. The first thing I learnt was that Julia’s friends are called Julians. If you don’t know it yet, Julia is a pretty new (v 0.3 is current) programming language for fast numerical computing. Everything is...

4185 sym R (1053 sym/5 pcs) 6 img

How to convert odds ratios to relative risks

27.01.2014

My short paper on this came out on Friday in the British Medical Journal. The aim is to help both authors and readers of research make sense of this rather confusing but unavoidable statistic, the odds ratio (OR). The fundamental problem is that quoting the odds in group A, divided by the odds in group B, confuses most people because we just don�...

3038 sym 6 img

Need to do a simulation study on a Bayesian model? Use Stan.

31.01.2014

I’ve been looking into a particular Bayesian meta-analysis model of late. Can’t tell you any more right now of course, but I wanted to check that it was throwing up sensible results and then compare it to classical MA methods. Bring out the simulation study! The trouble is, if you run this sort of thing in BUGS or JAGS, especially because the...

2349 sym 6 img

Visualizations on the Monopoly board

04.03.2014

Two items of post from utility companies that recently dropped through our door included little graphics. There was a degree of innovation in them both. The first, from British Gas, is technically OK but probably bad on perceptual grounds: I got a tape measure out and starting checking that they had scaled the flames and light bulbs by their ar...

1767 sym R (349 sym/1 pcs) 10 img

A simple R bootstrap function for beginners

05.03.2014

I teach some introductory stats classes with SPSS, and one of the frustrations for me is that you have to pay an extra wad of cash to do any bootstrapping. It’s not exactly the complete analysis solution that you might expect from the sales literature. I could go on, but I guess IBM have better lawyers than me. I think it’s a good idea to int...

1978 sym R (885 sym/1 pcs) 6 img

Data detective work: work out the numerator or denominator given a percentage

07.04.2014

Here’s some fun I had today. If you are looking at some published stats and they tell you a percentage but not the numerator & denominator, you can still work them out. That’s to say, you can get your computer to grind through a lot of possible combinations and find which are compatible with the percentage. Usually you have some information a...

1763 sym R (1322 sym/1 pcs) 4 img

Beeps and progress alerts to your phone

09.04.2014

Recently I encountered an R package called pingr, made by Rasmus Bååth (the same guy who did MCMC in a web page, my visualization of 2013). You install it, you type ping(), and it goes ping. Nice. Hear me now In fact there are nine built-in pingr noises. It’s more useful than it may seem; I was using it within minutes of reading the blog post...

3870 sym R (628 sym/3 pcs) 8 img

Stats in bed, part 1: Ubuntu Touch

25.04.2014

Round at the RSS Statistical Computing committee, we were having a chuckle at the prospect of a meeting about Stats In Bed. By which I mean analysis on mobile devices, phones and tablets (henceforth phablets), not some sort of raunchy performance indicator. This is something that has been nagging at the back of my mind for a while. Why, in this d...

5435 sym 18 img

Meta-analysis methods when studies are not normally distributed

10.06.2014

Yesterday I was reading Kontopantelis & Reeves’s 2010 paper “Performance of statistical methods for meta-analysis when true study effects are non-normally distributed: A simulation study“, which compares fixed-effects and a variety of random effects models under the (entirely realistic) situation where the studies do not happen to be drawn ...

3961 sym 4 img