Negative Binomial Regression
Negative binomial regression online for overdispersed count data. Theta, IRRs and CIs.
When to use it
Use when count data are overdispersed (variance is clearly greater than the mean) and a Poisson regression's dispersion check rejects the equal-mean-variance assumption. Common in ecological count data, hospital admissions, insurance claims, and species-abundance data where extra-Poisson variation is the norm rather than the exception.
When NOT to use it
Do not use when Poisson dispersion is close to 1; Poisson is more parsimonious. Do not use when zero inflation is the dominant feature (use a zero-inflated negative binomial or hurdle model). For continuous outcomes use linear regression on a log scale; for binary outcomes use logistic.
What you get
Coefficient table with log-rate estimates, SEs, Wald z, p, 95 percent CIs; incidence-rate ratios (IRRs) with CIs; the dispersion parameter theta (or alpha = 1/theta) with its SE; a likelihood-ratio test of alpha = 0 against Poisson (which the negative binomial nests); AIC for model comparison.
How to interpret the output
An IRR above 1 means the predictor increases the event rate; below 1 decreases. The dispersion parameter alpha quantifies overdispersion: alpha close to 0 reduces to Poisson; large alpha indicates strong overdispersion. The LR test of alpha = 0 confirms whether negative binomial is a meaningful improvement over Poisson; if it does not reject, prefer Poisson on parsimony. Cameron and Trivedi (2013) Chapter 4 covers the comparison.
Common pitfalls
- Reporting log-rate coefficients without the IRRs.
- Picking negative binomial over Poisson without the LR test of alpha (waste of a parameter).
- Confusing the negative binomial parameterisation (theta vs alpha; software differs).
- Forgetting log(exposure) as an offset when modelling rates per unit time or area.
Try it in StatVeda
The Negative Binomial Regression (overdispersed counts) engine runs entirely in the browser. No signup, no install, no data sent to a server. Paste your data, hit Run, copy the output.
Open Negative Binomial Regression (overdispersed counts)References
- Cameron, A. C. and Trivedi, P. K. (2013). Regression Analysis of Count Data, 2nd edition. Cambridge University Press, Cambridge.
- Hilbe, J. M. (2011). Negative Binomial Regression, 2nd edition. Cambridge University Press, Cambridge.
- McCullagh, P. and Nelder, J. A. (1989). Generalized Linear Models, 2nd edition. Chapman and Hall, London.