Question Your Model | When count data are more variable than expected: what is your model really assuming?

Many experiments generate count data: the number of insects caught in a trap, bacterial colonies observed on a plate, disease lesions counted on a plant, or events recorded over a set period. And for count data, a Poisson model is often a natural place to start.

But what happens when the data are much more variable than the model expects? This is known as overdispersion and can lead to incorrect inferences unless accounted for.

You might move to a negative binomial model, a common choice for overdispersed count data. But what if, even after allowing for this additional variability, there are still signs of overdispersion? What do you do now?

To answer this, let’s begin by considering what the model assumes about the way the data were generated.

An image of a definition of overdispersion: it occurs when the variability in the data is greater than expected under the assumed statistical model. For example, in a poisson model, overdispersion occurs when the variance is greater than the mean.

The Poisson model

A Poisson model is often the standard starting point for count data. However, one of its key assumptions is that, once the effects included in the model have been accounted for, the variance of the response is equal to its mean.

In real-world count data, counts are often more variable than this. For example, two experimental units with the same expected count may still differ substantially because of environmental conditions, biological heterogeneity, spatial effects, differences between blocks, or other sources of variation that have not been included in the model. When the observed variability is greater than the Poisson model expects, the data are said to be overdispersed. 

Overdispersion can also arise from the way the counts are generated. For example, faecal egg counts may be aggregated because parasitic worms lay eggs in batches, rather than eggs occurring independently. This can produce more variability than would be expected under a Poisson distribution. More generally, dependence between counts or variation in the underlying rate between experimental units can lead to overdispersion. Less commonly, count data can be underdispersed, with less variability than the Poisson distribution expects. For example, in one experiment parasitoids marked hosts in which they had already laid an egg, making them less likely to lay another egg in the same host. This resulted in more counts of one, and fewer zeros and counts greater than one, than expected under a Poisson distribution.

A common check for overdispersion is to compare the residual deviance with the residual degrees of freedom. For a well-fitting Poisson model, these should be broadly similar. A ratio well above 1 (a large residual mean deviance) suggests that there is more variation in the data than the model allows. However, a large value does not necessarily mean that overdispersion is the only problem. It can also indicate that the model is missing important terms or that there are unusual observations in the data. The ratio should also be interpreted with care when many of the counts are small.

The negative binomial model

The negative binomial model relaxes the strict Poisson relationship between the mean and variance, and so is often recommended for dealing with overdispersion. The negative binomial distribution can be characterized as a gamma–Poisson mixture: the underlying means follow a gamma distribution, and each observation is a Poisson count with that mean. Instead of requiring the variance to equal the mean, the negative binomial model allows the variance to exceed the mean, with the extra variability increasing as the mean increases. The relationship between the mean (μ) and variance (v) is v = μ + μ2/k where k is known as the aggregation parameter, with smaller values of k indicating greater aggregation.

This makes the negative binomial model more flexible when the observed counts are more variable than a Poisson model would predict. However, it still makes assumptions about how that variability behaves. So, while it can help account for overdispersion, it may not fully capture the extra variability in the data. There are other overdispersed distributions available with different mean–variance relationships, such as the Poisson-lognormal, Poisson-Pascal, Pólya–Aeppli and Neyman type A, but these are not members of the exponential family and so do not fit within the standard GLM framework.  

As with the Poisson model, the residual mean deviance can be used to assess whether there is still more variability than the model allows. A value around 1 may suggest that the model is providing a reasonable fit, while a value well above 1 can indicate that the data are still overdispersed, even after fitting a negative binomial model. However, this check is less informative when the negative binomial aggregation parameter has been estimated from the same data, or when many of the counts are small.

Allowing for additional dispersion

An alternative to the negative binomial model is to retain the Poisson mean structure but estimate an additional dispersion parameter (often referred to as a quasi-Poisson approach). This essentially scales up the variance allowed by the Poisson model to account for the extra variability in the data. The parameter estimates remain the same as for the Poisson model, but the standard errors and significance tests are adjusted to reflect the additional variability.

The key difference is in how the two approaches allow that extra variability to change with the mean. With a dispersion-adjusted Poisson model, the variance increases in proportion to the mean. With a negative binomial model, the variance can increase more rapidly as the mean gets larger. Which is more appropriate depends on how the variability of the data behaves.

Note: An additional dispersion parameter can also be estimated with a negative binomial model if there is still more variability in the data than the negative binomial model allows.

Where is the extra variability coming from, and what can we do about it?

When we fit a model, it is important to think about what assumptions the model makes about variability in the data. And if the counts are more variable than expected, we also need to consider what might be driving that extra variability. 

Some possible reasons for the extra variability – and ways these might be addressed – include:

  • The relationship between the mean and variance may not match the model assumptions. The variability may increase with the mean in a different way from that allowed by the model.
    You could try a different distribution or variance structure – for example, a negative binomial model rather than a Poisson model. 
  • Important explanatory variables may be missing. Environmental conditions, timing or other relevant factors may explain some of the differences between observations.
    You could try including relevant explanatory variables as covariates in the model, where appropriate.
  • There may be additional structure in the experiment. For example, observations from the same block or site may be more similar to each other than to observations from other groups.
    You could try representing this structure through random effects, for example by moving from a GLM to a generalized linear mixed model (GLMM) or hierarchical generalized linear model (HGLM).
  • There may be more zeros than the model expects. For example, many insect traps may contain no insects at all.
    You could try investigating why the zeros are occurring and, where appropriate, fitting a zero-inflated or hurdle model. (Note: Overdispersed count data can naturally contain more zeros than a Poisson model predicts, so think about why the zeros are occurring before deciding how to model them.)
  • Unusual or influential observations may be contributing to the apparent overdispersion.
    You could try examining residuals and influence diagnostics to identify observations that warrant closer investigation.
  • The relationship between the response and the explanatory variables may not be adequately described by the model. For example, the effect of a continuous explanatory variable may not follow the form assumed by the model.
    You could try allowing for non-linear relationships, for example by including polynomial terms or splines, or exploring a different link function where scientifically appropriate.
  • The counts may be more appropriately modelled on a different scale. Particularly when counts are relatively large, the assumptions of a conventional linear model may be reasonable after transformation.
    You could try transforming the counts – for example, using a logarithmic transformation – and fitting a linear model, then checking whether its assumptions are reasonable. (Note: Transformations bring their own considerations. For example, zero counts need special treatment before taking logarithms, and back-transformed results have a different interpretation from means estimated directly on the count scale.)
  • There may simply be more unexplained variability than the model allows. Even after considering the design, explanatory variables and other features of the data, the model may still underestimate the variability.
    You could try estimating an additional dispersion parameter, allowing the uncertainty in the analysis to reflect this extra variation.

Different approaches model variability differently

A negative binomial model changes the assumed relationship between the mean and variance. An additional dispersion parameter allows for more unexplained variability. Covariates can explain variability associated with measured characteristics, while random effects can represent variability associated with the experimental structure. Zero-inflated or hurdle models address excess zeros, while transforming the response and fitting a linear model represents the variability on a different scale.

Choosing an appropriate approach means understanding what it assumes and whether those assumptions make sense for your data.

Does the conclusion change?

Where there are several scientifically and statistically defensible approaches, it can be useful to ask whether the scientific conclusion depends on the modelling assumptions. For example, if a negative binomial GLM, a dispersion-adjusted Poisson model and a linear model on log-transformed counts all lead to the same conclusions about the treatments, that is reassuring: the answer does not depend on one particular set of assumptions.

If they disagree, that is important information too. It tells you that the conclusion is sensitive to how the variability is modelled, and that the assumptions need closer scrutiny before the result is relied on.

What should you do in practice?

Start with the data, the experimental design and the scientific question. Think about how the data were generated, where variability might arise, and how you would expect that variability to change with the mean. Sense-check the assumptions you are making against what you know about the real-world system or process that generated the data. These considerations should help guide your choice of model.

Once you have fitted the model, check how well it describes the data and whether its assumptions appear reasonable. Look at the residuals and other diagnostics. Is there evidence of overdispersion or other lack of fit? Are there unusual observations? Is there structure or variability that the model has not adequately captured?

If the model does not provide an adequate description of the data, think about why before deciding what to change. A different distribution, additional covariates, random effects, a dispersion parameter or another modelling approach each addresses a different aspect of the problem.

Importantly, just because a model can be fitted does not mean it is appropriate for the data or the scientific question. Software such as Genstat makes it straightforward to fit sophisticated statistical models, but deciding which assumptions are defensible, whether the model is appropriate for the data and how they were generated, and what conclusions can reasonably be drawn from the analysis requires statistical judgement. And this is where statistical expertise matters.

At VSNi, we help researchers choose appropriate analyses, understand the assumptions and limitations of their models, and have confidence in the conclusions they draw.

And remember … always question the appropriateness of your model!


Note: This blog was motivated by a thread on the Genstat Discussion list.

Picture of Dr. Vanessa Cave
Dr. Vanessa Cave
Dr. Vanessa Cave is an applied statistician interested in the application of statistics to the biosciences, in particular agriculture and ecology, and is a developer of the Genstat statistical software package. She has over 15 years of experience collaborating with scientists, using statistics to solve real-world problems. Vanessa provides expertise on experiment and survey design, data collection and management, statistical analysis, and the interpretation of statistical findings. Her interests include statistical consultancy, mixed models, multivariate methods, statistical ecology, statistical graphics and data visualisation, and the statistical challenges related to digital agriculture. Vanessa is a past President of both the Australasian Region of the International Biometric Society and the New Zealand Statistical Association, on the Editorial Board of The New Zealand Veterinary Journal and an honorary academic at the University of Auckland. She has a PhD in statistics from the University of St Andrew.

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

Related articles

How much of the variation in your field trial comes from the treatments, and how much comes from...
What should you do when count data are more variable than your model expects? Vanessa Cave and David...
Precision breeding can deliver scientifically impressive traits, but practical value depends on more than technical success. Owen McIntosh...