Thursday, 8 March 2018

Careful conclusions needed about the relationship between taverns and assault

In research, it is not uncommon for two different researchers, faced with the same research question and the same dataset, to come to very different conclusions about the answer to the research question. They may have simply used different research methods. Two researchers using the same methods and the same dataset could similarly come to different conclusions, if they have, included different variables in their analyses, excluded or included different subgroups or outlying observations, and so on. It is less common for two researchers to look at the same analysis and come to very different conclusions (differences in interpretation are, however, fairly common).

So, with that in mind I was interested to read this week new research by Adam Ward, Paul Bracewell, and Ying Cui (all from the Wellington-based Dot Loves Data), published in the journal Kotuitui: New Zealand Journal of Social Sciences Online (ungated). The paper generated a fair amount of media interest (see here and here), because it investigated the relationship between tavern locations and assaults. Those who are familiar with my research will recognise that this is one of my keen areas of research interest. Adam Ward actually sent me an early copy of this paper last year, but I have to admit I didn't have time to read it and that's a real shame, as will become clear below.

The authors used police data on assaults and Ministry of Justice data on the location of taverns for the 2016 calendar year. They essentially tested whether meshblocks (in urban areas, a meshblock is around the size of a city block, and they are bigger in rural areas) that had at least one assault differed from those that had no assaults, in terms of the distance to the nearest tavern, and the density of taverns within 500 metres. They tested this separately for 'peak assaults' (those occurring on Friday or Saturday nights) and 'off-peak assaults' (those occurring at other times). They also tested separately for differences between meshblocks that had multiple (more than one) assault and those that had one or fewer assaults.

One really cool thing they did, and which other studies have not done, is run a placebo test. They created a variable based on a sample of fast-food outlets, shopping centres, supermarkets, and petrol stations (which they called 'traffic generators'), and also used that variable in place of the tavern variables in some models, to see what happened. I had a Summer Research Scholarship student do something similar for Hamilton data a few years ago, using hairdressers, bakeries, service stations, and fast food outlets - hopefully, I'll find time to properly write up that research this year!

Anyway, coming back to the Ward et al. paper, they concluded that:
...our results show that whilst tavern density and proximity are more strongly associated to assault occurrence at peak times compared to traffic generator density and proximity, the reverse is true at off-peak times. It is not surprising that tavern density and proximity should be more strongly associated with assault occurrence at peak times compared to traffic generators given that the majority of the traffic generators within our sample are unlikely to open throughout peak hours.
They are suggest that their results show that taverns are associated with peak assaults more than 'traffic generators' (their placebo). However, here's their Table 2, with the key rows highlighted (you might need to zoom in to see it clearly):


The top two highlighted rows show the results for peak assaults (comparing meshblocks that had any assault in 2016 with those that had none). The top row (model 1) uses tavern variables, and the second row (model 2) uses 'traffic generator' variables. Comparing the two rows, the standardised coefficient for tavern proximity is clearly much larger for taverns than it is for traffic generators (and the odds ratio is larger for taverns than for 'traffic generators'). This suggests that the distance to the closest traffic generator has a much greater effect on peak assaults than the distance to the closest tavern. Similarly, the standardised coefficient for tavern density is clearly smaller for taverns than it is for traffic generators (and the odds ratio is smaller for taverns than for 'traffic generators'). This suggests that the number of taverns within 500m has a smaller effect on peak assaults in a meshblock than the number of traffic generators within that distance.  If you look at the second pair of highlighted rows (for multiple assaults), you'll notice the same conclusions can be reached. You've also probably noticed that these conclusions are the opposite of Ward et al.'s conclusions from above - taverns aren't associated with more peak assaults than traffic generators; they're associated with fewer peak assaults.

What explains the difference? Ward et al. focus their attention on the last column: the Gini coefficient. In the context of a logistic regression model, the Gini coefficient is simply a measure of how good the overall model is at classifying meshblocks, in this case classifying them into those meshblocks with assaults and those without assaults. You shouldn't interpret the Gini coefficient as telling you anything about the individual variables in the model, in the same way that you can't infer anything about individual variables from looking at the R-squared in a linear regression model. Just because the overall model provides a better fit (according to the Gini coefficient), it doesn't mean that the size of the effects demonstrated by the coefficients in the model are larger (which you can only determine by looking at the coefficients or odds ratios)!

Aside from the conclusions, the choice of a logistic regression model is somewhat odd. It treats a meshblock that had two assaults in a year the same as a meshblock that had twenty assaults. A count-based (e.g. Poisson) model would have made more sense, and to be honest their results are probably driven by their choice of model. A Poisson model would have better accounted for the greater incidence of assaults (when there was more than one) in the vicinity of taverns, and Poisson models have become increasingly common in this literature (and are the appropriate models to use in this context for theoretical reasons, which are explained in an article I have written with Bill Cochrane and Michael Livingston that is nearly complete, and which I'll blog about in the future).

Having said that, the paper isn't all bad. As I said above, I liked the placebo approach. Also, my quote of the day (which I am sure to refer to in future work) is:
...31% of peak time assaults occur within 100 m of a tavern whereas this geometric region constitutes only 2.3% of New Zealand’s land mass and contains only 6.3% of the population.
That's a conclusion I can't disagree with.

Tuesday, 6 March 2018

The boundaries between economics, psychology and biology are narrowing

Have you ever wondered how it is that we can simultaneously see a dinner purchased at Wendy's (which might cost us $20 per person) as relatively cheap, and yet simultaneously see spending $20 per person on ingredients for a dinner we cooked for ourselves at home as lavishly expensive. Ok, maybe you haven't experienced that particular conundrum, but certainly there are some things that are cheap in dollar terms that you view as relatively expensive, while simultaneously seeing some things that are expensive in dollar terms that you view as a bargain.

The answer lies in the complex workings on the human brain. Understanding our decision-making on a very fundamental level is the role of the exciting emerging field of neuroeconomics. Neuroeconomics is blurring the boundaries between economics, psychology and economics and offering new insights into how we make decisions.

So, on that note, I found this news release from Washington University School of Medicine from last November interesting:
Researchers at Washington University School of Medicine in St. Louis have found that when monkeys are faced with a choice between two options, the firing of neurons activated in the brain adjusts to reflect the enormity of the decision. Such an approach would explain why the same person can see 20 cents as a lot one moment and $5,000 as a little the next, the researchers said.
“Everybody recognizes this behavior, because everybody does it,” said senior author Camillo Padoa-Schioppa, PhD, an associate professor of neuroscience, of economics and of biomedical engineering. “This paper explains where those judgments originate. The same neural circuit underlies decisions that range from a few dollars to hundreds of thousands of dollars. We found that a system that adapts to the range of values ensures maximal payoff.”...
While you are contemplating whether to order a scoop of vanilla or strawberry ice cream, a part of your brain just above the eyes is very busy. Brain scans have shown that blood flow to a brain area known as the orbitofrontal cortex increases as people weigh their options.
Neurons in this part of the brain also become active when a monkey is faced with a choice. As the animal tries to decide between a sip of, say, apple juice or grape juice, two sets of neurons in its orbitofrontal cortex fire off electrical pulses. One set reflects how much the monkey wants apple juice; the other set corresponds to the animal’s interest in grape juice. The faster the neurons fire, the more highly the monkey values that option.
A similar process likely occurs as people make decisions, the researchers said. But what happens to firing rates when a person stops thinking about ice cream and starts thinking about houses? A house might be hundreds of thousands of times more valuable than a cup of ice cream, but neurons cannot fire pulses 100,000 times faster. The speed at which they can fire maxes out at about 500 spikes per second.
How does this explain the example I started this blog post with? It appears (to me, at least), that this research (which you can read here, but beware - it's very technical) is showing that there are biological underpinnings for why relative comparisons matter, more than absolute comparisons. The research was on rhesus monkeys rather than humans, but human brain functioning probably works in very similar ways. The firing of neurons associated with different options depends on what the other options are and their relative value to us, rather than their absolute value in terms of the overall universe of things that we could receive. In other words, our preferences adjust to the scale of values in the choices we are making:
The researchers concluded that making a choice between two juices is not a simple matter of comparing the firing rates of the apple-juice neurons to the firing rates of the grape-juice neurons. Instead, neurons pegged to each option feed into a neural circuit that processes the data and corrects for differences in scale.
It’s a system optimized for making the best possible choice – the one that reflects true preferences over a vast range of values, even though some detail gets lost at the higher end.
“It was a puzzle: How does the brain handle this enormous variability?” said Padoa-Schioppa. “We showed that a circuit that has adaptation and corrects for it ensures maximal payoff. And these findings have implications for understanding why people make the choices they do. There’s a good neurological reason for behavior that might seem illogical.”
Neuroeconomics is pretty cool. Expect to see a lot more of this type of research in the future, especially combined with machine learning to deal with the complexity of brain scan data.


Monday, 5 March 2018

The price of cauliflower hits $10

From today's New Zealand Herald:
Hankering for cauliflower in your meat and two vege?
Well be prepared to shell out for it as some are $10 a head.
Cauliflower was photographed priced at $9.99 yesterday at New World, Wellington.
A Herald photographer this morning found a cauliflower for $9 at Farro Fresh and an out of stock sign for the vegetable at a Ponsonby Countdown.
My ECONS101 class won't cover supply and demand for a few weeks yet (perhaps that seems odd, but it's a consequence of adopting the CORE textbook), but that simple model does an excellent job of explaining what is going on. From the article:
Annette Laird, of Foodstuffs NZ, which owns the New World, Pak'n'Save and Four Square brands, said recent wet weather had affected the quality and reduced supply of cauliflower.
"It's been raining a lot. Cauliflower don't like the rain..."
Consider the market for cauliflower, shown in the diagram below. Initially the market is at equilibrium, with the price of cauliflower at P0 and the quantity traded at Q0. Then, adverse weather hits and farmers are unable to supply as much cauliflower (regardless of the price). This shifts the supply curve up and to the left (a decrease in the supply of cauliflower from S0 to S1). The equilibrium (where the demand curve meets the supply curve) shifts along the demand curve up to the left. The equilibrium price increases from P0 to P1, while the equilibrium quantity of cauliflower traded decreases from Q0 to Q1.


Which shows why you're paying $10 for cauliflower this week. But don't blame the farmers. It is important to note that, in a market like this, the sellers have no direct control over the price. Woodhaven managing director John Clarke is quoted in the article:
"We are purely price takers, what the wholesale market pays is what we get and they are paying more for what we don't have much of."
The supermarkets of course have more control over the retail price than farmers do over the wholesale price, but remember that supermarkets are paying the (higher) wholesale price for cauliflower, and they will be passing that onto the consumer.

Friday, 2 March 2018

Relative wages and the teacher shortage

Jack Boyle (president of the Post-Primary Teachers Association) wrote in the New Zealand Herald today:
Another way to look at it is that relativity matters. It's not the absolute value of the reward that's going to determine whether a task (or job) is seen as worth it, but how it compares with what others are getting too.
What's this got to do with teachers?
Over the past 10 years teachers have kept on getting cucumber while other workers are getting grapes. Relativity between what teachers earn and other workers has seriously declined.
A simple measure of this is the comparison between secondary teacher salaries and the median earnings of all employees. Since the early 2000s we've dropped significantly, from 1.8 times the median (for experienced teachers on the top of the pay scale) to just over 1.5. In effect, this means jobs that used to earn less than teachers now earn more, and jobs that require less than our four years' study are catching up.
Boyle is right that relativity matters for decision-makers, including students who are deciding whether to study to become teachers or something else. In this case, it the relative wage between teaching and other alternatives is one of the important determinants of the students' decisions. If teachers' salaries have risen less than the salaries that graduates in other disciplines earn (which is what the fall from 1.8 times the median wage to 1.5 times implies), then the relative wage has shift in favour of those other occupations. As a result, fewer students will choose to study to become teachers.

The relative wage between teachers and other occupations is made even worse by changes the non-monetary characteristics of teaching (which should also be relevant to students' decision about whether to study to be a teacher):
The work that secondary teachers do has become far more complex. Just in the past few years paper-work demands have exploded. There are now forms to fill out when you confiscate a student's phone, or go on a class trip, not to mention the planning, marking and moderation requirements of NCEA.
The relative wage between teaching and alternative occupations is a problem, and will be especially acute in Auckland, as I've noted before. If we really want to address the teacher shortage, then the government needs to step up and make the occupation more attractive for graduates, while at the same time heading off ill-conceived proposals that would make the problem worse.

Read more: