Posts written by Thomas Lumley (1103)


Thomas Lumley (@tslumley) is Professor of Biostatistics at the University of Auckland. His research interests include semiparametric models, survey sampling, statistical computing, foundations of statistics, and whatever methodological problems his medical collaborators come up with. He also blogs at Biased and Inefficient

April 18, 2014

Cannabis and Radio Yerevan

Radio Yerevan jokes were a thing in the Soviet Union days

The Armenian Radio was asked: “Is it true that in Moscow, Mercedes cars are being given to citizens?”

The Armenian Radio answers: “Yes, but it is not Moscow but Leningrad, not Mercedes but Ladas, and not given to but stolen from.” 

From the Herald, yesterday

People who had only used cannabis once or twice a week for a matter of months were found to have changes in the brain that govern emotion, motivation and addiction.

Here’s the research paper, which you won’t be able to access, so I’ll summarisse

Firstly, no-one in the study was found to have ‘changes’ in the brain: the participants got only one brain scan, so the research didn’t even look at changes. It found differences between cannabis users and non-users. There’s nothing even slightly surprising about the possibility that people who end up as regular users of an illegal drug might have started off with brain differences.

There were 20 cannabis users in the study, who smoked an average of 11 joints per week, and had been smoking cannabis for an average of six years. Here’s the data for one of their findings, on ‘gray matter density in the nucleus accumbens’



The dots at zero are the controls, the other dots are the cannabis users. There certainly aren’t many who use cannabis only once or twice per week. It’s hard to tell whether there’s really anyone who has only used cannabis for a few months,  because the research paper only reports the mean and standard deviation for duration of use.

So, the main point of the story in the paragraph quoted above is completely unsupported by the research.  This one isn’t entirely the fault of the media, since the researchers were pushing hard to exactly this sort of unsupported claim into the papers.  Still, you might have hoped someone they talked to would have matched up the claims to the research..



April 17, 2014

This is not a map



This is not a map. The Asian population of the US is not confined to Maine and northern Washington, and residents of the Dakotas are not primarily Black and Hispanic. It’s a stacked line plot, which has been cut out to fit the map outline, just like you might do in kindergarten. (via Flowing Data)

Here’s the real thing, from Pew Research.


April 16, 2014

Ways not to use the Global Drug Use Survey

We learned previously from Stuff and the Global Drug Use Survey that 22% of New Zealanders have used synthetic cannabis. Today

Results from this year’s Global Drug Survey, conducted in partnership with Fairfax Media, found almost 4 per cent of synthetic cannabis users sought emergency medical treatment. More than a quarter of those were admitted to hospital.

It simply cannot be true that 4% of 22% of the country has sought emergency treatment after using synthetic cannabis. Even restricting to adults, that’s 30,000 people, with more 7,500 admitted to hospital. In the most recent year for which I can find data (2010-11, when the drugs were more widely available than now) there were 672,000 publicly funded hospital admissions for all causes, and of those, only 896 were for cause categories X41 & X42, which would include all synthetic cannabis cases plus many others.

[update: fixed typo in numbers]

April 14, 2014

What do we learn from the Global Drug Use Survey?



That’s the online summary at Stuff.  When you point at one of the bubbles it jumps out at you and tells you what drug it is. The bubbles make it relatively hard to compare non-adjacent numbers, especially as you can only see the name of one at a time. It’s not even that easy to compare adjacent bubbles, eg, the two at the lower right, which differ by more than two percentage points.

More importantly, this is the least useful data from the survey.  Because it’s a voluntary, self-selected online sample, we’d expect the crude proportions to be biased, probably with more drug use in the sample than the population. To the extent that we can tell, this seems to have happened: the proportion of past-year smokers is 33.5% compared to the Census estimate of 15% active smokers.  It’s logically possible for both of these to be correct, but I don’t really believe it.  The reports of cannabis use are much higher than the (admittedly out of date) NZ Alcohol and Drug Use Survey.  For this sort of data, the forthcoming drug-use section of the NZ Health Survey is likely to be more representative.

Where the Global Drug Use Survey will be valuable is in detail about things like side-effects, attempts to quit, strategies people use for harm reduction. That sort of information isn’t captured by the NZ Health Survey, and presumably it is still being processed and analysed.  Some of the relative information might be useful, too: for example, synthetic cannabis is much less popular than the real thing, with past-year use nearly five times lower.

Peak car?

From the Herald, quoting the chief executive of Z Energy:

“People are doing online shopping and Skyping granny rather than making the fortnightly visit.”

A 1 per cent improvement in broadband connectivity is estimated to cause a drop of 200 million litres a year in national fuel demand, more than the impact of GDP growth, population, fleet turnover, vehicle efficiency and the petrol price.

The first question here is on units. For broadband, it’s fuel demand per 1% of connections, but what are the units for the others?

There’s a bit more detail in this set of slides, including this picture, where the orange bar shows the estimated effect of an increase in the factor and the yellow bar shows the estimated effect of the same decrease.

So if we believe these numbers, a 1% point increase in broadband has slightly larger impact than a 1% increase in GDP and about twice the impact of a 1% increase in population.

For this model to be useful in prediction, which is what Z Energy presumably made it for, there’s no need that these statistical associations are causal. It’s only necessary that they persist at roughly the same strength through the period of the forecast.  The associations can’t really be true under serious extrapolation. For example, reducing broadband coverage from the current roughly 80% of households to zero would probably not cause transport fuel use to rise by 16 billion litres — ie, more than triple. Similarly, it can’t really be true that the impact nominal petrol prices is independent of inflation or income trends. For prediction this doesn’t necessarily matter, but for interpreting causes it does.

The actual prediction impact of broadband depends on how much it will increase. It turns out that the model says the reduction due to broadband plus the reduction due to increasing petrol prices approximately cancels out the increase due to increasing GDP. So, in fact, in the Z Energy model, broadband is less important than GDP growth. The model ends up predicting that per-capita travel will be roughly constant,  that total travel will increase with population, and that fuel efficiency will increase.

So, is the broadband association causal? It easily could be. There’s evidence from other countries of a reduction in driving that can’t entirely be attributed to the Great Recession. This is especially true among young people, with more socialising electronically. Telecommuting probably plays a role, too. I’m not convinced that online shopping has had a big impact on car trips in NZ, but it could have.  On the other hand, there huge uncertainty in the size of the effect — not just statistical uncertainty based on the data, but uncertainty about what’s fundamentally going on.

Finally, one depressing, but probably accurate, feature of the predictions is that they assume we still won’t be doing anything about climate change by 2018.

April 13, 2014

Housing affordability map

Saeid Adli and Alex Raichev have made interactive maps of Auckland and Wellington that try to combine the cost of housing (rent) and commuting, and present it as a fraction of income.  You can select income, house size, mode of transport, how often you commute, etc.

They also provide an explanation of how they do the calculations, and all the code and data.


April 11, 2014

Past performance no guarantee of future results

From the ACC

Julius Caesar was warned to beware the ‘Ides of March’. And perhaps Kiwis should take extra caution this Sunday.

That’s because April the 13th last year was the day on which the highest number of injuries happened during 2013.

Of course, April 13th wasn’t a Sunday last year. ACC helpfully give us the top five days last year for injuries

  • 13 April – 8,067 claims
  • 6 April – 8,024 claims
  • 11 May – 7,988 claims
  • 18 May – 7,757 claims
  • 8 June – 7,732 claims.

What do all these days have in common? Well, let’s just say that the ACC warning for Sunday April 13 may be a bit late.


The favourite never wins?

From Deadspin, an analysis of accuracy in 11 million tournament predictions (‘brackets’) for the US college basketball competition, and 53 predictions by experts



Stephen Pettigrew’s analysis shows the experts average more points than the general public (651681 vs 604.4). What he doesn’t point out explicitly is that picking the favourites, which corresponds to the big spike at 680 points, does rather better than the average expert.


April 10, 2014

Frittering away

Q: Did you see that “some generation Y foodies are spending up to $600 a week on gourmet produce such as seafood, cheeses, olives and cured hams.”

A: In the Herald? Yes.

Q: Is it true?

A: Slightly.

Q: Who are these people?

A: Well, for a start, they’re Australians

Q: Oh. How many is “some”

A: At least one.

Q: No, seriously, how many?

A: 1% of a the 18-34 subset of a sample of ‘over’ 1000. Here’s the full report

Q: How many is that?

A: Maybe three in the sample?

Q: Three people or three households?

A: A good question. They don’t say, though the average weekly food expenditure in their sample looks reasonably close to the national household average that they cite.

Q: How were the people sampled?

A: They don’t say.

Q: How many were Generation Y?

A: They don’t say

Q: How did they even define ‘gourmet food’? Or don’t they say that either?

A: Sadly, no.

Q: This report doesn’t seem to follow the code of practice you blogged about recently, does it?

A: That was just for political polls, and anyway this report is Australian.

Q: Is there anything else you want to complain about in the report?

A: If  you call it an “Inaugural” report you really can’t use it to conclude “Australians are becoming a more food savvy nation”.