Celeus

Poisson or negative binomial regression?

Poisson and negative binomial regression both model counts. How to check for overdispersion, why it matters, and when negative binomial is the better choice.

Updated .

On this page

Poisson regression and negative binomial regression both model counts: birds seen on a transect, infections per ward, errors per page, visits per month. Both use a log link, and both report an effect as a rate ratio. The difference is in how much variability they allow. Poisson regression assumes the variance of a count equals its mean. Real counts are usually more variable than that, a property called overdispersion, and when it is present Poisson regression reports standard errors that are too small and p-values that are too optimistic.

A sensible default is to check for overdispersion and, when it is present, use negative binomial regression. The point estimates often barely move between the two models. What changes is the honesty of the uncertainty around them.

Poisson vs negative binomial regression: what differs

Both models relate the logarithm of the expected count to a linear combination of predictors. Exponentiating a coefficient gives a rate ratio: the multiplicative change in the expected count for a one-unit increase in the predictor, or for a group compared with its baseline. A rate ratio of 3 means three times the expected count. The difference is only in the variance model:

  • Poisson: variance equals the mean, with nothing left to estimate.
  • Negative binomial: variance is the mean plus an extra term that grows with the square of the mean, controlled by one additional dispersion parameter estimated from the data.

Because the negative binomial model can reduce to the Poisson as the dispersion goes to zero, the choice is really “do I need the extra parameter?”. It is the same family of generalized linear models (Nelder and Wedderburn, 1972), with a more flexible variance.

Poisson regression

Poisson regression suits counts of events in a fixed window or area: non-negative whole numbers with no upper limit in principle. Beyond the variance condition, it assumes the events are independent given the predictors and that the log of the expected count is linear in the predictors. If units were observed for different lengths of time or over different areas, the rate per unit of exposure is the quantity of interest, and that needs an exposure term in the model.

The equal mean and variance condition is rarely exact. Counts of clustered or contagious events, such as animals that gather in groups or infections that spread, are more variable than Poisson allows.

Overdispersion, and how to check for it

A simple check fits the Poisson model and divides its residual deviance by its residual degrees of freedom. If the model fits, the ratio is near 1. A ratio well above 1 means the counts vary more than the Poisson model expects. A ratio of about 1.5 is one common rule-of-thumb cut, not a law; formal tests exist too (Cameron and Trivedi, 1990). Treat borderline values as a reason to look at the data, not as a verdict.

What overdispersion does is mostly about uncertainty. The Poisson coefficient estimates remain sensible, but their standard errors are too small, so confidence intervals are too narrow and false positives become more common. Negative binomial regression widens the intervals to reflect the real variability. Ver Hoef and Boveng (2007) compare it with the quasi-Poisson alternative, which keeps the Poisson mean model and just inflates the standard errors, and show that the two can give different answers because they weight observations differently.

Overdispersion is also not the same thing as excess zeros. A count with far more zeros than either model expects may need a zero-inflated or hurdle model, which are beyond the scope of this guide.

Negative binomial regression

The negative binomial model adds a dispersion parameter, so the variance can exceed the mean by an estimated amount. The coefficients keep the same rate-ratio reading as in Poisson regression. If the data turn out to be only mildly overdispersed, the estimated dispersion is small and the two models give nearly the same answer, so using the negative binomial model costs little (Hilbe, 2011). If you are unsure, choosing negative binomial is the safer error.

Counts that come in clusters

Overdispersion has a cousin. When you have several counts per subject, site or plot, those counts are not independent: observations from one site resemble each other. Treating them as independent understates uncertainty in the same way overdispersion does. The standard remedy is a mixed-effects Poisson (or negative binomial) model with a random effect for the cluster, which separates between-cluster variation from the within-cluster count noise. If your design has repeated or clustered counts, this is the model to consider, not a plain Poisson fit.

Worked example: bird counts by habitat

A synthetic study counts birds on 20 transects, 10 in meadow and 10 in woodland. The data are synthetic, generated in R 4.6.1.

Habitat Counts per transect Mean Variance
Meadow 2, 0, 5, 1, 9, 3, 0, 6, 2, 4 3.2 8.2
Woodland 6, 12, 3, 19, 8, 1, 15, 7, 24, 5 10.0 54.4

The variance is well above the mean in both habitats, especially woodland. That is the signature of overdispersion. Fitting a Poisson model with habitat as the only predictor gives a residual deviance of 75.4 on 18 degrees of freedom, a dispersion ratio of 4.2, far above 1.5.

Both models estimate the same rate ratio for woodland against meadow: 3.13, meaning about three times as many birds per transect. The uncertainty differs a lot:

Model Rate ratio (woodland vs meadow) 95% CI p
Poisson 3.13 2.12 to 4.72 0.00000002
Negative binomial 3.13 1.53 to 6.45 0.0018

The Poisson interval is much narrower, and its p-value is about five orders of magnitude smaller. Both statements cannot be right. The Poisson numbers pretend each transect count carries more information than it does. The negative binomial interval still excludes 1, so the conclusion about direction holds, but it is far more cautious about how large the difference is. Reporting the Poisson result here would overstate the precision.

Which one to report

  • Dispersion ratio near 1, no sign of clustering: Poisson regression is fine, and simpler.
  • Clear overdispersion (a ratio well above 1, or counts whose variance obviously exceeds the mean): negative binomial regression, reported as rate ratios with confidence intervals.
  • Repeated or clustered counts: a mixed-effects model for counts, whether or not overdispersion is also present.
  • Many more zeros than expected: consider zero-inflated or hurdle models, and say so.
  • Do not choose by the smaller p-value. Decide on the dispersion check and the design, then report the model you chose along with what the check showed.

How Celeus handles this

Celeus reports the overdispersion check (residual deviance divided by residual degrees of freedom) alongside both the Poisson and the negative binomial result, and presents the effect as a rate ratio. When the data are overdispersed it grades negative binomial as the recommended model and Poisson as a caution, so you choose with that in view. For a count outcome measured within clusters, it proposes a mixed-effects Poisson regression. Celeus does not currently support an exposure or offset term, so rates over unequal observation periods need other software.

Sources

  1. Hilbe JM (2011). Negative Binomial Regression, 2nd ed. Cambridge University Press. doi:10.1017/CBO9780511973420
  2. Cameron AC, Trivedi PK (1990). Regression-based tests for overdispersion in the Poisson model. Journal of Econometrics 46(3):347-364. doi:10.1016/0304-4076(90)90014-K
  3. Ver Hoef JM, Boveng PL (2007). Quasi-Poisson vs. negative binomial regression: how should we model overdispersed count data? Ecology 88(11):2766-2772. doi:10.1890/07-0043.1
  4. Nelder JA, Wedderburn RWM (1972). Generalized linear models. Journal of the Royal Statistical Society, Series A 135(3):370-384. doi:10.2307/2344614

Methods discussed

Try it on your own data

Upload a dataset and Celeus suggests a method, checks its assumptions, runs it in R, and gives you the script to rerun it.

Try it in Celeus