Showing posts with label Statistics. Show all posts
Showing posts with label Statistics. Show all posts

Saturday, 24 August 2024

Try this: Stata cheat sheets

Despite the rise of R, and more recently Python, most economists still rely on Stata. Understanding any statistical software entails a steep learning curve, and Stata is no different. So, any opportunity to shorten the learning curve should be accepted with open arms.

I recently discovered that Stata has a bunch of 'cheat sheets' available here, that were developed by Tim Essam and Laura Hughes. They cover the fundamental commands associated with: (1) data analysis; (2) programming; (3) data processing; (4) data transformation; (5) data visualisation; and (6) plotting in Stata. They will come in handy for both novices and experienced users alike.

Essam and Hughes have further training resources available on GitHub here (which made me realise that I have seen these cheat sheets, or earlier versions of them, before - I shared them with my colleagues and PhD students back in 2016, although I didn't post the links to this blog).

Anyway, the cheat sheets are certainly helpful. Enjoy! 

Tuesday, 30 July 2024

Frank DiTraglia on how to read econometrics papers

Reading economics research papers is hard work when you are doing it for the first time as a graduate student. That's why I try to get as many undergraduate students as possible engaged in some 'inspectional reading' (a term I learned from Marc Bellamare's book Doing Economics, which I reviewed here), through the Waikato Economics Discussion Group. The hardest papers to read are papers in econometrics. Hard, but unfortunately necessary for students and researchers who want to apply the latest methods to their analyses, or who want to understand fully the canonical methods in econometrics.

So, it was interesting to read Frank DiTraglia's advice recently on how to read econometrics papers. Econometrics papers don't really lend themselves to 'inspectional reading', because the purpose of reading them is to understand the methods, and the actual results and simulations used to illustrate those methods are often incidental to this purpose.

DiTraglia offers a number of tips for readers (targeted at graduate students, but of use to other readers as well), including:

  1. Reading more recent articles that apply the method, or reading review articles, rather than reading the original paper that introduces a particular method;
  2. Don't assume that you have to understand the whole thing when you read a paper, but focus on understanding the key ideas;
  3. Don't assume that you're stupid if you don't understand the paper, because key details that the authors assume you know about may be left out of the paper (which means reading other articles is doubly important);
  4. Try explaining the key ideas to someone else, because as anyone who has done any teaching can tell you, you only really recognise how little you really understand, when you go to try and teach it to someone else; and
  5. Head straight to the simulation or empirical example, rather than getting bogged down in the equations.

DiTraglia offers other points of advice as well, but I think those are the key points for most people who aren't going to get deep into the weeds of how a particular method works. Personally, I can vouch for #1 and #5 as really helping me to understand some econometrics papers, but especially #1. In my experience, the first person to develop a particular method is often rubbish at explaining it. It is only the subsequent authors, applying the method themselves and writing papers (who are really doing #4 from DiTraglia's list when they write up their research), who are really helpful in understanding the method.

[HT: Both David McKenzie on the Development Impact blog, and Marginal Revolution]

Monday, 3 July 2023

Have large language models killed online data collection?

Data is the lifeblood of empirical social science research. Whether it be quantitative or qualitative data, or both, you couldn't do empirical research without it. Self-evidently, the quality of data matters. As the saying goes, garbage-in-garbage-out. You want high quality data to analyse. So, this new working paper by Veniamin Veselovsky, Manoel Horta Ribeiro, and Robert West (all École Polytechnique Fédérale de Lausanne) should be causing some disquiet, especially among those who use Amazon mTurk and similar sources for generating data, because in the paper the authors:

...quantify the usage of LLMs by crowd workers through a case study on MTurk, based on a novel methodology for detecting synthetic text. In particular, we consider part of the text summarization task from Horta Ribeiro et al. (2019), where crowd workers summarized 16 medical research paper abstracts. By combining keystroke detection and synthetic text classification, we estimate that 33-46% of the summaries submitted by crowd workers were produced with the help of LLMs.

Yikes! Between one-third and one-half of mTurk workers are already using large language models (LLMs) like ChatGPT to complete their work. It is easy to see that using mTurk for collecting data from experiments, surveys, etc. has just become untenable. At least, it is untenable if researchers want data collecting from real humans, rather than from LLMs masquerading as humans.

It gets worse though. It isn't just mTurk where this is likely to be a problem. Any online survey is now vulnerable to being completed by a LLM, rendering most online data collection fraught. Journal editors and reviewers will no doubt become aware of this in the future (if they aren't already), so publishing research based on data collected from humans using online methods is going to become a whole lot harder to get published in future.

It's not going to end there. Since LLMs are now generating a non-trivial proportion of online content, a lot of online data is going to lose credibility. And, to top it all off, if future LLMs are being trained on internet-sourced data, they will effectively be being trained on data that is partially generated by today's relatively-low-quality LLMs. There doesn't seem to be much of a way around this.

Anyway, getting back to the Veselovsky et al. article, they aren't as negative in their conclusions as I am above:

All this being said, we do not believe that this will signify the end of crowd work, but it may lead to a radical shift in the value provided by crowd workers.

I guess it depends on what you want the crowd workers to do. As I said above, they won't be contributing much of value to researchers in the future (unless the researchers are researching LLMs). Part of the lifeblood of social science research is bleeding away.

[HT: Marginal Revolution]

Saturday, 20 May 2023

How not to analyse the relationship between climate and international migration

I've done research before on the relationship between climate and migration (see this post, and the paper published here, or ungated here). So, I was really interested to read this new article by Dennis Wesselbaum (University of Otago), published in the journal Letters in Spatial and Resource Sciences (open access). Wesselbaum uses data on migration flows from 198 countries to 16 OECD countries, along with temperature data from the Berkeley Earth database, and weather-related disasters data from the EM-DAT (international disasters) database. Controlling also for GDP, population, political freedom, life expectancy, and share of agricultural land, he finds that:

...temperature, but not weather-related disasters, have a significant direct effect on migration in our sample. Temperature has a smaller effect on migration towards OECD countries in Asia compared to Europe, Africa, and North America. For disasters, we only find a stronger effect on migration in Asia compared to Africa. Temperature matters in most regions while disasters do not.

However, as the Economics Discussion Group students and I discussed in our most recent session, there are two key statistical problems with Wesselbaum's analysis. The first is the way that migration flows equal to zero (of which there are likely to be many) are dealt with. Because the dependent variable is the log of migration, and the log of zero is undefined, Wesselbaum deals with this by "adding one to all flows". That creates a problem of bias, as I noted in this recent post. Most migration researchers have instead adopted the Poisson pseudo-maximum likelihood (PPML) approach (see this working paper, for example), as it not only copes with zero values, but also deals with over-dispersion.

The second issue is likely to be more problematic. The three key variables in the analysis (migration, temperature variation, and weather-related disasters) are all trended over time. When you run an analysis with a long time-series (or, as in this case, a long panel dataset), then time trends in the variables can lead to spurious correlations. That's the reason why per capita cheese consumption is highly correlated with the number of deaths by bedsheet entanglement:


Two variables that are both trended over time will tend to look like they are closely correlated, even when a change in one of the variables does not cause a change in the other. Even when you use more complicated statistical methods, this remains a problem. To see why that may be a problem here, consider Figures 1-3 from Wesselbaum's paper:



Notice how all three variables have an upward trend. Economists refer to these time series as being non-stationary (which essentially means that the mean value of the variable is not constant over time). That doesn't mean for certain that there are problems in Wesselbaum's analysis, but it does mean that he should have tested for non-stationarity in the variables. If time series variables are found to be non-stationary, a simple solution can be to take first-differences (so that each variable would then be the difference between its value at time t, and its value at time t-1). Since Wesselbaum doesn't report the tests for stationarity, we have no way of knowing how serious the problems are, and the risk is that the correlation he identifies is simply spurious, and driven entirely by the time trends in the data.

This is not the way to analyse these data. However, it does open an opportunity for a good Honours or Masters student to replicate the analysis with a better approach.

Read more:

Tuesday, 25 April 2023

Reason to be cautious with the inverse hyperbolic sine transformation

Trigger warning: This post is more technical than my usual posts.

Economists often transform data (on incomes, for example) by taking logarithms. This has statistical advantages, in terms of making the distribution of otherwise skewed variables behave better in the analysis. It also has a neat property in terms of the interpretation of regression coefficients, because in a log-linear model (where the dependent variable is measured in logs and the explanatory variable is not) the coefficient can be interpreted as a percentage change, and in a log-log model (where both the dependent and explanatory variables are measured in logs) the coefficient is an elasticity.

However, there is a problem with the log transformation. Any value of zero (or a negative number) is undefined, and this makes some analyses challenging. For example, in gravity models of trade or migration, small areas that are far apart may have zero flows between them. Since the gravity model relies on logs of trade or migration flows, the zero values cause a problem. Or, if you want to estimate the effect of some programme for underemployed youth on employment income, you would often use the log of income as the dependent variable. However, unemployed people may have zero reported income, and those zero values cause a problem.

There are few good ways of dealing with the problem of zeroes or negative values in a variable that you want to log-transform. You could drop all negative or zero values, but that decreases the sample size and likely biases your results (because observations that have zeroes or negative values are usually different in meaningful ways from those that have positive non-zero values). Another option is to compute ln(X+1) rather than ln(X) when log-transforming the variable X. That deals with zeroes, but not large negative numbers, and it also biases the results (but probably not as much as simply dropping data would).

An alternative transformation that has gained some traction in recent years is the inverse hyperbolic sine (asinh) transformation. That transformation involves computing the equation asinh(X) = ln(X+(X^2+1)^(1/2)), which is actually not quite as complicated as it seems. It deals with variables with zero values (but not large negative values). Moreover, it has been argued that coefficients on variables transformed in this way have the same interpretations as variables that have been log-transformed.

However, all may not be as rosy as it seems. This blog post by David McKenzie at the Development Impact blog suggests that we should be much more cautious with the asinh transformation. The post draws on a variety of recent articles and working papers that have investigated the asinh transformation and its properties. The first problem is that it seems that it is really sensitive to the units of measurement, such that measuring in dollars can result in different coefficient estimates than measuring in thousands or millions of dollars. That should not be the case when the coefficient is supposed to be interpreted as a percentage or an elasticity!

The kicker may be this bit:

Chen and Roth re-estimate 10 papers published in the AER that used the i.h.s transformation for at least one outcome, and illustrate how re-scaling the outcome units by 100 can lead to a change of more than 100% in the estimated treatment effect – with the largest changes coming for programs that had impacts on the extensive margin. E.g. In Rogall (2021)’s work on the Rwandan genocide, he looks at how the presence of armed groups fosters civilian participation in the violence. The extensive margin effect is 0.195, so a big extensive margin change. The estimated treatment effect then changes from 1.248 to 2.15 depending on whether y or 100*y is used as the outcome – which implies a massive change in the implied percentage change effect if interpreting these as either log points or like a log variable.

The Chen and Roth working paper that McKenzie refers to is available here. Given how often this transformation has been used in recent times, I had recently added it to my personal econometrics cheat sheet. However, I haven't felt the need to use it in my own work as yet (because, in gravity models for example, we tend to use Poisson pseudo-maximum likelihood (PPML), which deals with zero values better than the alternatives to log-transformation). I've now had to go back and footnote my cheat sheet with a cautionary note.

And that is probably the takeaway from McKenzie's post (and the papers he cites there), although he does provide some suggested ways of proceeding (adapted from the Chen and Roth working paper). I prefer to just suggest that when we use the asinh transformation, we need to be cautious.

Sunday, 2 October 2022

Good reason to avoid mediation analysis

Following on from yesterday's post on the problems with instrumental variables analysis, I read this post by Uri Simonsohn on the Datacolada blog about mediation analysis. Mediation analysis has always struck me as somewhat odd, and it isn't an approach that is common in economics. And fortunately so, as Simonsohn points out that the problems with mediation analysis are actually quite serious:

In mediation analysis one asks by what channel did a randomly assigned manipulation work. For example, suppose that an experiment finds that randomly assigning Calculus 101 students to have quizzes every week (X) increased their final exam grade (Y).  Mediation analysis is used to test whether this happened because quizzes led students to study more hours through the semester (M). Mediation is present if the estimated effect of X gets smaller when controlling for M...

The problem of interest to this post is that if there is any variable, besides X, that correlates with M and Y (a very likely scenario), mediation is invalid.

Notice the similarity to yesterday's post about instrumental variables analysis. However, instrumental variables analysis might still be valid in many cases, but it requires a strong theoretical basis for the exogeneity of the instrument. For mediation analysis, this problem is probably fatal for almost all applications. Simonsohn provides a very clear explanation of why, and concludes:

In general, if we do mediation analysis, it means we expect X to lead M and Y to be correlated in our experiment. If we expect that, we should expect that other factors, confounds, cause M and Y to be correlated outside our experiment.

This post explains why such correlation invalidates mediation. In other words, this post explains why, in general, we should expect mediation to be invalid.

Simonsohn also provides some good references that provide further support for the problems with mediation analysis (along with an interesting reading that strongly critiques path analysis more generally, which I will certainly follow up on in a future post). It is certainly clear (if it wasn't already) that mediation analysis should be left out of the regular statistical toolbox.

[HT: David McKenzie on the Development Impact blog]

Friday, 1 October 2021

Gorillas in the midst of data

In a famous experiment, Daniel Simons and Christopher Chabris tested people's selective attention, asking them to count the number of times a basketball is passed. If you haven't seen or heard of this test, you should try it out for yourself:

Did you see the gorilla? Some years ago, I was shown a different video with the same premise, and I totally missed it. The whole point is that, when we are very focused on a particular task, we can totally miss other important things that are going on.

That brings me to this 2020 article by Itai Yanai (NYU Langone Health) and Martin Lercher (Heinrich Heine University), published in the journal Genome Biology (open access). Yanai and Lercher gave students two datasets, which each contained data on body mass index (BMI) and the number of steps taken each day. One dataset was data points for women, and one dataset was data points for men. Yanai and Lercher then placed the students into two groups, and gave the two groups different instructions:

The students in the first group were asked to consider three specific hypotheses: (i) that there is a statistically significant difference in the average number of steps taken by men and women, (ii) that there is a negative correlation between the number of steps and the BMI for women, and (iii) that this correlation is positive for men. They were also asked if there was anything else they could conclude from the dataset. In the second, “hypothesis-free,” group, students were simply asked: What do you conclude from the dataset?

When you're given a dataset with no idea of what to look for, it is natural to start with some simple tabulations or data visualisations. And, if students merged the two datasets together and graphed BMI against steps per day, they saw this (from Figure 1a of the paper):

Yes, that is a gorilla waving at you from the data. Interestingly, Yanai and Lercher find that:

...overall, students without a specific hypothesis were almost five times more likely to discover the gorilla when analyzing this dataset...

Specifically, nine of 14 students who were given no hypotheses found the gorilla, but only five of 19 students who were given hypotheses did so. This was a small-scale study, and not entirely serious, but it does illustrate a serious point: when we are focused simply on hypotheses, we may miss important features of the underlying data, and that's why it's a good idea to start with some simple tabulations and visualisations (and I will admit, I'm as guilty as anyone of jumping this step, especially for datasets that I think I know well).

Yanai and Lercher draw a distinction between 'day science' and 'night science':

There is a hidden cost to having a hypothesis. It arises from the relationship between night science and day science, the two very distinct modes of activity in which scientific ideas are generated and tested, respectively... With a hypothesis in hand, the impressive strengths of day science are unleashed, guiding us in designing tests, estimating parameters, and throwing out the hypothesis if it fails the tests. But when we analyze the results of an experiment, our mental focus on a specific hypothesis can prevent us from exploring other aspects of the data, effectively blinding us to new ideas. A hypothesis then becomes a liability for any night science explorations... Night science has its own liability though, generating many spurious relationships and false hypotheses. Fortunately, these are exposed by the light of day science, emphasizing the complementarity of the two modes, where each overcomes the other’s shortcomings.

So, when we look at data, we need to do so both by day and by night.

[HT: David McKenzie at Development Impact, especially for the clever title of this post] 

Saturday, 21 August 2021

The past and future of statistical significance

The latest issue of the Journal of Economic Perspectives had a symposium on statistical significance, which included three articles (all ungated). In the first article, Guido Imbens (Stanford University) outlines three concerns with the use of statistical significance and the use of p-values:

The first concern is that often p-values and statistical significance do not answer the question of interest. In many cases, researchers are interested in a point estimate and the degree of uncertainty associated with that point estimate as the precursor to making a decision or recommendation to implement a new policy. In such cases, the absence or presence of statistical significance (in the sense of being able to reject the null hypothesis of zero effect at conventional levels) is not relevant, and the all-too-common singular focus on that indicator is inappropriate...

The second concern arises if a researcher is legitimately interested in assessing a null hypothesis versus an alternative hypothesis... Questions have been raised whether p-values and statistical significance are useful measures for making the comparison between the null and alternative hypotheses...

The third concern is the abuse of p-values... To put it bluntly, researchers are incentivized to find p-values below 0.05.

These are all concerns that are not new, and relate to the case made in the book The Cult of Statistical Significance by Stephen Ziliak and Dierdre McCloskey (which I reviewed here). Imbens argues that the first concern is the most important. Interestingly, he takes a more moderate view than others have done in recent years:

In my view, banning p-values is inappropriate. As I have tried to argue in this essay, I think there are many settings where the reporting of point estimates and confidence (or Bayesian) intervals is natural, but there are also other circumstances, perhaps fewer, where the calculation of p-values is in fact the appropriate way to answer the question of interest.

Confidence intervals do make a lot of sense. However, to me they are still not so much different to a p-value (the 95% confidence interval is just as arbitrary as a p-value of 0.05).

In the second article, Maximilian Kasy (University of Oxford) discusses the problems arising from the 'forking path'. The forking path is a metaphor drawn from Jorge Luis Borges, who:

...wrote a short story in 1941 called “The Garden of Forking Paths.” The plot involves (among other elements) a journey in which the road keeps forking...

Statisticians have used the metaphor from Borges to convey how empirical research also involves a garden of forking paths: how data is chosen and prepared for use, what variables are the focus of inquiry, what statistical methods are used, what results are emphasized in writing up the study, and what decisions are made by journal editors about publication.

Essentially, this article is about the selection bias in published research, arising from reporting bias (where only some, but not all, statistical results are reported in published studies) and publication bias (where only some, but not all, studies are published). Kasy outlines the problems (which again, are well known to researchers), and then some potential solutions, including: (1) pre-analysis plans, where the analyses are pre-specified and deviations along the forking paths can easily be identified by editors, journal reviewers, and readers of research; (2) pre-results journal review (or 'registered reports'), where journal articles are accepted on the basis of proposed analyses, before any analysis is conducted or results are available; and (3) journals for null results and replication studies, which could reduce the publication bias and help to identify studies with fragile results.

Kasy finishes by making an alternative proposal for the structure of publishing:

There might be a set of top outlets focused on publishing surprising (“relevant”) findings, subject to careful quality vetting by referees. These outlets would have the role of communicating relevant findings to attention-constrained readers (researchers and decision-makers). A key feature of these outlets would be that their results are biased by virtue of being selected based on surprisingness. In fact, this is likely to be true for prominent outlets today, as well. Readers should be aware that this is the case: “Don’t take findings published in top outlets at face value.”

There might then be another wider set of outlets that are not supposed to select on findings but have similar quality vetting as the top outlets, thus focusing on validity and replicability. For experimental studies, pre-analysis plans and registered reports (results-blind review) might serve as institutional safeguards to ensure the absence of selectivity by both researchers and journals. Journals that explicitly invite submission of “null results” might be an important part of this tier of outlets. This wider set of outlets would serve as a repository of available vetted research and would not be subject to the biases induced by the selectivity of top outlets...

To make the findings from this wider set of publications available to attention-constrained decision-makers, systematic efforts at aggregating findings in review articles and meta-studies by independent researchers would be of great value... Lastly, systematic replication studies can serve as a corrective for the biases of top publications and as a further safeguard to check for the presence of selectivity among non-top publications.

I'm not sure how workable that system is, or how we would get to there from where we are today. Some of the elements are already in place, and replications and systematic meta-analyses are becoming more common. However, there would be substantial reluctance on top journals to be seen as publishing research that is 'biased by surprisingness'.

The third article, by Edward Miguel (University of California, Berkeley) focuses on open science and research transparency. This covers some of the same ground as Kasy's article (pre-analysis plans, and registered reports) but also covers the availability of statistical code and data to be used for replication. Miguel notes that there has been an increase over time in the sharing of data and code, but he also notes that it is not without cost:

Across 65 project datasets, the average amount of time to prepare replication materials for public sharing was 31.5 hours, with an interquartile range of 10.0 to 40.5 hours (and a 10th to 90th percentile range of 5.8 to 80.2 hours). This is non-trivial for most projects: still, remember that this estimate of preparation time applies to field experiments that often require multiple years of work on collecting data, so it remains a very small share of overall project work time.

There are offsetting benefits though:

The most immediate private benefit that I and many other scholars have personally experienced from new open data norms is the fact that our own research data is better organized for ourselves and thus easier to reuse for other analyses and papers as a result of the effort that is put into improved documentation (like the README files and other replication materials).

There are a couple of salient issues here, both of which Miguel touches upon. The first issue is equity - producing replication materials is likely to be lower cost for researchers who employ a small army of research assistants, whereas many researchers would have to do this work themselves. The second issue relates to replication more generally, where:

...researchers’ growing ability to access data and code from previous studies has led to some controversy... there may be “overturn bias,” in which reanalysis and replications that contradict an originally published paper are seen as more publishable.

This is related to the 'surprisingness' that Kasy notes. The last thing we would want is that the journals that are devoted to replication have a bias towards negative findings (so, then there would be publication biases in both directions).

Overall, there is a lot of interest in the three articles in this symposium. It is not all bad news - an optimistic view would be that many of the problems with statistical significance, publication bias, etc. are already acknowledged, and steps are already being undertaken to address these. The biggest thing that researchers can do going forward, though, is to be a bit more sensible in relation to interpreting statistical significance. The difference between a p-value of 0.049 and a p-value of 0.051 is not in itself statistically significant. As Ziliak and McCloskey noted in their book (and a point that was only raised by Imbens of the three authors in this symposium), it is economic significance, rather than statistical significance, that is most important.

Monday, 15 April 2019

We count Pitcairn Islanders in New Zealand. Why not Timorese?

New Zealand has a standard classification of ethnicity that allows Statistics New Zealand (or other government agencies) to describe the ethnicity of people in a way that is consistent and comparable across all government agencies. The classification has four levels. The top level has essentially six categories: (1) European; (2) Māori; (3) Pacific Peoples; (4) Asian; (5) Middle Eastern, Latin American, and African (MELAA); and (6) Other ethnicities. For a long time, I've been critical of the Pacific, Asian, and MELAA groups as merging some extremely heterogeneous populations into a single category. For instance, the Asian group includes Japanese, Fijian Indian, and Afghani people, as if they were all in some way similar. The MELAA group is an even bigger nonsense.

Many researchers use data at the top level of the classification in a fairly uncritical way. Even those who view the data with a healthy dose of scepticism are forced to use it when it is the only level of data that is available. The level of ethnic disaggregation often depends on whether you are looking at the national level, the regional level, or more locally (and relates to the point I discussed in my post yesterday - in that research we used Level 2 ethnicity data, but previous researchers had focused on Level 1). For instance, below the national level, the data produced by Statistics New Zealand is often aggregated to Level 1 or Level 2 of the ethnic classification (for example, the Census data available at NZ.Stat is only available at Level 2 for territorial authorities, and for most of the cross-tabulations it is only available at Level 1). Consequently, most of the research (especially health research) I have seen uses the Level 1 classification.

The New Zealand Herald picked up on this issue in a story this morning:
An immigration expert has slammed what he sees as New Zealand's systemic failure to recognise minority ethnic and religious communities.
This comes after Statistics New Zealand revealed that one in seven failed to fully complete Census 2018.
Massey University sociologist Professor Paul Spoonley said the use of "crude categorisations" like Asian and Pasifika by authorities hid important differences and the true diversity of the nation.
Census participants were asked to list their race and ethnic origin. But those who identified with an "infrequent" or "unanticipated ethnic group" were put under a "not elsewhere classified" group.
Of course, the classification works that way for good statistical reasons. The smaller the number of people in an ethnic group, the greater the statistical error in any research that involves them, or in any table of data or cross-tabulation involving that group. And the smaller the group, the more likely that publishing numbers related to that group inadvertently compromises the confidentiality of the data. So, even if data were published related to small ethnic groups, there would be a lot of data suppressed due to small numbers. The standard classification of ethnicity tries to minimise this problem by grouping ethnic groups that have small numbers into the "not elsewhere classified" groups.

However, Paul makes an excellent point. So, let's have a look at those "not elsewhere classified" (NEC) ethnic groups, focusing on the Asian Level 1 ethnic group.

At Level 4 of the standard classification of ethnicity, the following groups fit under the Asian category [*]: Filipino; Cambodian; Vietnamese; Burmese; Indonesian; Lao; Malay; Thai; Karen; Chin; Southeast Asian NEC; Hong Kong Chinese; Cambodian Chinese; Malaysian Chinese; Singaporean Chinese; Vietnamese Chinese; Taiwanese; Chinese NEC; Bengali; Fijian Indian; Indian Tamil; Punjabi; Sikh; Anglo Indian; Malaysian Indian; South African Indian; Indian NEC; Sinhalese; Sri Lankan Tamil; Sri Lankan NEC; Japanese; Korean; Afghani; Bangladeshi; Nepalese; Pakistani; Tibetan; Eurasian; Bhutanese; Maldivian; Mongolian; and Asian NEC.

That is a lot of groups, but there are some notable omissions. Essentially it would be impossible to find any data from Statistics New Zealand or any government agency on any Asian group that does not appear on that list. The New Zealand Herald highlighted the omission of the Peranakan group in an article today, but we could add Timorese, Uighur, Rohingya, and any number of other small (and marginalised) groups, for which having access to data would be useful. I expect that Timorese and Rohingya are included in the Southeast Asian NEC category, but it would be hard to know (there is no detail in the classification to tell us).

Uighur might be included in the catch-all "Eurasian" group, which presumably also includes the Uzbek, Kazakh, Turkic, and Kyrgyz ethnic groups, etc. You might argue that these groups are small, and similar enough to group together, but I expect they would disagree. Or maybe the Uighur are in the Chinese NEC category. Again, it is hard to know.

The Pacific Peoples category has similar cases (for example, no category for Marshall Islanders, Palauans, or even Micronesians more generally). Don't get me started on the MELAA group - this post might end up thousands of words long.

The argument for 'ignoring' these groups, or merging them into other groups or into an NEC category is, as I noted above, in order to ensure that the merged groups are large enough to count. However, what constitutes an ethnic group that is 'too small to count' in Level 4 of the classification must be fairly arbitrary. Level 4 includes a category for Pitcairn Islander. Pitcairn Island has a permanent population of 50, so how many of them could possibly be living in New Zealand?

If we can count Pitcairn Islanders (population in the home location of 50), then surely we can count Timorese (1.3 million, in Timor-Leste, plus more in the western half of the island), Rohingya (around 1-1.3 million), or Uighurs (over 12 million). Not to mention the hundreds of other ethnic groups with small numbers in New Zealand. It's time to refresh New Zealand's standard classification of ethnicities to ensure that all minority groups count, and are counted.

*****

[*] I'm ignoring the "not further defined" category, which is where we know what category the person belongs to based on a higher level of the classification, but not at Level 4. That might occur, for instance, if someone says they are "Southeast Asian", which is a category at Level 2 of the classification, but not at Level 4.

Tuesday, 30 January 2018

Boy racers can't do statistics

Matthew Hansen wrote in the New Zealand Herald today:
Let's get this out of the way early - "boy racer" is a ridiculous and outdated term. Much of the country's modified car culture is propped up by the middle-aged, and by women. We're a world leader for female involvement in motorsport.
The "boy" aspect isn't exactly prevalent in the New Zealand Transport Agency's numbers for road deaths either. In the past 12 months, 379 drivers have been killed, and the three biggest age groups represented are those from 25-39 (103), 60-plus (91), and 40-59 (91). By contrast, deaths for those aged 15-19 number 25, and 52 for 20- to 24-year-olds.
I'm no rocket scientist, but those numbers are smaller. So why empower an outdated, incorrect term like "boy racer"?
Yes, those numbers are smaller, but that's often what happens when you compare the numbers of events happening to people in a five-year age group (15-19 or 20-24 years) with the comparable numbers for a 15-year age group (25-39), a 20-year age group (40-59), or a 40+-year age group (60 years and over). Before comparing the number of road deaths between age groups, you need to adjust for the relative number of people in each age group, to work out the incidence of road deaths. [*]

The number of road deaths this year so far are available from the NZTA road toll website. There are some small differences with the numbers that Hansen uses (probably because the statistics reported there are for the 12 months that end on the day you access the website), so for comparability I will use Hansen's numbers. The numbers of people in each age group are available from Statistics New Zealand (NZ.Stat) for 30 June 2017 (which is close enough to the mid-point for the year ended on some day in January).

While there have been 103 road deaths among people aged 25-39, there are 962,550 people in that age group. That works out to 1.07 road deaths per 10,000 people. Compare that with 52 road deaths and 355,830 people aged in the 20-24 age group, which works out at 1.46 road deaths per 10,000 people. For completeness, the other values are in the table below.


Clearly, the highest risk group is the 20-24 year age group when it comes to road deaths. I'm no rocket scientist either, but the numbers for other groups are smaller. In some cases close to half of the incidence for the 20-24 year age group. Maybe boy racers should stick to cars, not statistics? And the Herald should send its reporters to a course on some basic statistical literacy.

*****

[*] Even better would be to adjust for the number of vehicle road miles travelled by members of that age group, which would be a 'more correct' measure of risk exposure (for vehicle travellers, so probably pedestrian and cyclist road deaths should be excluded first too).