Skip to content

1.6 Statistical analysis

The first thing I did was get the statistical test itself written down and explained — the equation, the two conditions that would provide support to the hypothesis, and a figure showing what each of them looks like. What makes this complicated is that you need enough knowledge of the method to tell whether it is doing the right thing. The trick then is to build a picture an a text which explains the test in a way that you and others understand.

The visualisations changed the test

In the example, after working through the figures in step three, we saw a large cluster of countries had a very low proportion of permanent forest loss, which made a linear regression test of the relationship between the amount of loss and income the wrong test to run. The question I could ask instead was which countries crossed a threshold: did a country permanently convert more than 2% of its year-2000 tree cover, and does the chance of that depend on income? Picking the threshold is awkward and I come back to it below. Changing the outcome after seeing the plots is a decision made from the data, which is the exploratory character of this analysis.

A yes-or-no outcome makes logistic regression the natural model. Other classifiers would do the job, but logistic regression is the most used of them and its parameters can be interpreted, which matters when the parameter is the result. The model fits the log odds of being above the threshold as a quadratic in log income. The squared term is what allows an inverted U at all — without it the model can only find a monotone trend.

Write the test down before you run it

Most of that half hour went on which models to present and in what order. We settled on three stages: a linear model in the log odds with the quadratic term set to zero; then an ordinary linear regression and a Spearman rank correlation as a cross-check; and only then the quadratic term and the inverted-U test. Starting with a straight line, confirming it with a correlation and building up to the quadratic is the natural way into this problem, and it was not the order the agent chose for itself. I imposed it.

Then I asked it to draw the test. Asking for a figure that explains the statistical test is something I do often, and it did real work here. The figure sets out the two conditions for an inverted U: the maximum of the curve has to lie inside the observed income range, which here runs from roughly $1,000 to $100,000 a year, and the slope has to be clearly positive at the poor end and clearly negative at the rich end. A second panel shows a case where neither condition holds.

Two panels, the first showing a curve whose maximum falls inside the marked income range with the slope positive at the poor end and negative at the rich end, the second a case where neither condition holds

Both curves are drawn from chosen coefficients rather than fitted to anything, and both have a negative squared term, so a test of that coefficient on its own would be satisfied by either. Only the left panel turns inside the range. The right one bends without turning, and that is the case reported as a decline.

Drawing it changed the writing — once the figure existed, and once I had said which part was hard to follow, the agent explained the method better than it had before. The quadratic is the statistically awkward part of this problem, and the figure is what made it communicable.

I also cut a lot of terminology. The agent had brought in Fieller intervals and intersection–union tests, which made the methods sound more impressive and were not needed to say what the test does. Asked whether we really had to talk about Fieller intervals when what we mean is the slope at the low income and the slope at the high income, it agreed and took them out.

What came out, and whether it held

The chance that a country converted more than 2% of its forest falls as income rises, with p below 10⁻⁷, and the Spearman correlation agrees — negative, and worth one sentence in the report rather than a section.

There is no evidence for the inverted U. Adding the square of log income does not establish one: the slope is negative at the top of the income range, but at the bottom it cannot be distinguished from zero, so only one of the two conditions holds. For loss from any cause, counting fire and logging alongside permanent conversion, there is no relationship even on the linear scale, so the U-shape test was not run on it at all.

The 2% threshold was my arbitrary choice, so I had the whole analysis rerun at ten of them. The slope is negative at every one, between −1.07 and −0.74, with the whole 95% interval below zero in each case, and the joint condition for an inverted U met at none. This is a sweep that used to be slow and fiddly enough to talk yourself out of, and now costs nothing, which removes the usual excuse for leaving an arbitrary cut-off unchecked.

Also see