- Introduced by
- Hilbe (textbook treatment); generalized linear model framework
- Year
- 2011
- Type
- Generalized linear model for count data
What does it do?
Negative Binomial Regression is a model for count outcomes that extends Poisson regression to handle overdispersion, where the variance of the counts exceeds their mean.
It is placed within the generalized linear model framework and treated in depth by Hilbe (2011). It adds a dispersion parameter so that inference stays valid when Poisson would understate the spread of the data.
The intuition behind the method
Imagine counting events — clinic visits, defects, accidents — where the data are far more scattered than a Poisson model expects: a few units rack up very high counts while most stay low. Poisson assumes the variance equals the mean, so it underestimates this extra spread and reports standard errors that are too small. Negative binomial regression loosens that constraint by adding a dispersion parameter, letting the variance grow faster than the mean and restoring honest standard errors.
History
Negative binomial regression is treated here within the generalized linear model framework, as the standard remedy for overdispersed counts that violate the Poisson equal-variance assumption. It can be derived as a Poisson model with gamma-distributed multiplicative heterogeneity, which is how it is used, for example, in insurance experience rating. The cited source is Hilbe's Negative Binomial Regression (2nd ed., 2011, Cambridge University Press), a monograph covering the model, its parameterizations, estimation, and the diagnostics used to compare it with Poisson. It is a modern reference rather than the origin of the model.
When to use it
Choose negative binomial regression when the outcome is a count of events (non-negative integers) and the variance is clearly larger than the mean, Var(Y) > E(Y). It fits cross-sectional data in which observations are independent of one another. Repeated measures on the same units (panel data) violate that independence unless the model is extended to account for unit-level correlation, so a plain negative binomial fit to such data is not a safe default. Check dispersion first by fitting a Poisson model. A Pearson chi-square divided by residual degrees of freedom near 1 suggests Poisson is adequate, while a clearly larger ratio suggests overdispersion. No fixed cut-off defines 'clearly', so base the choice on the estimate of α, a likelihood-ratio or AIC comparison with Poisson, and residual diagnostics. Avoid the model for continuous or binary outcomes. Small samples make the joint estimate of the dispersion parameter unstable, so check the standard error of α; the cited source establishes no fixed minimum sample size.
Limitations and considerations
- Requires a non-negative integer (count) outcome; it is not appropriate for continuous or binary responses.
- Small samples make the joint estimation of the coefficients and the dispersion parameter unstable; inspect the standard error of α.
- Assumes that observations are independent given the predictors. Repeated measures on the same unit, as in panel data, break this assumption and call for a panel-specific extension.
- Does not, on its own, address an excess of zeros beyond what overdispersion explains.
Source conditions do not replace independent scientific review or validation by an analysis engine.
Strengths
- Correctly handles overdispersed count data, where Poisson would produce standard errors that are too small.
- Coefficients exponentiate into incidence rate ratios (IRR), giving a direct multiplicative interpretation of each predictor on the event rate.
- Nests Poisson as a special case (α → 0), so it can be compared against Poisson via AIC to confirm whether the extra dispersion parameter is needed.
Applications
- Modelling health-care utilisation counts, such as the number of clinic or hospital visits per patient.
- Counting defects, accidents, or insurance claims, where a few units accumulate very high counts.
- Comparing a count model with a Poisson baseline on the same predictors, using the dispersion check and AIC to decide whether the extra dispersion parameter is needed.
How it works
How it works
The expected count for observation i is linked to the predictors through a log link, log(E[y|x]) = xᵀβ, so each coefficient acts multiplicatively on the rate. The response y is assumed to follow a negative binomial distribution with mean μ and dispersion parameter α. This page uses the NB2 parameterization, in which the variance is μ + αμ². Other parameterizations exist, for example NB1 with variance linear in the mean, and are covered in the cited monograph.
Formula
\log\big(\mathbb{E}[y_i \mid x_i]\big) = x_i^{\top}\beta,\quad y_i \sim \text{NB}(\mu_i, \alpha)The defining feature is the quadratic variance function Var(y) = μ + αμ², where α > 0 captures overdispersion (α → 0 recovers Poisson). This form arises when y given an unobserved heterogeneity factor is Poisson, and that factor follows a gamma distribution with mean 1 and parameter A. Marginally the variance is μ + μ²/A, so α = 1/A. The coefficients β and the dispersion α are estimated jointly by maximizing the negative binomial log-likelihood. Exponentiating a coefficient gives an incidence rate ratio (IRR). Report α with its standard error: larger values mean more extra-Poisson variation.
Formula
\operatorname{Var}(y_i) = \mu_i + \alpha\,\mu_i^{2},\qquad \hat{\beta},\hat{\alpha} = \arg\max_{\beta,\alpha}\; \ell(\beta,\alpha)Common pitfalls
- Defaulting to Poisson without testing for overdispersion. When Var(Y) > E(Y), Poisson standard errors are too small and significance is overstated.
- Using negative binomial regression when the real problem is structural excess zeros; a zero-inflated or hurdle model may fit better.
- Forgetting to exponentiate coefficients: the raw β is on the log scale, while exp(β) is the interpretable incidence rate ratio.
- Applying it to a non-count outcome, or to a very small sample, and over-interpreting unstable estimates.
- Treating the Pearson ratio as a formal test. Testing α = 0 places the null on the boundary of the parameter space, so the standard chi-square p-value from a likelihood-ratio test is conservative.
Frequently asked questions
How is negative binomial regression different from Poisson regression?
Poisson regression forces the variance to equal the mean. Negative binomial regression adds a dispersion parameter α so the variance can grow as μ + αμ², which fits overdispersed counts (Var > Mean). As α approaches 0 the negative binomial collapses back to Poisson.
How do I know if I need the negative binomial instead of Poisson?
Fit a Poisson model first and inspect the Pearson chi-square divided by the residual degrees of freedom, which should be near 1 if Poisson is adequate. No fixed cut-off defines overdispersion. Base the decision on the estimate of α and its standard error, a likelihood-ratio test or AIC comparison with Poisson (the α = 0 boundary makes the usual chi-square p-value conservative), and residual diagnostics.
What does an exponentiated coefficient mean?
Because of the log link, exp(β) is an incidence rate ratio (IRR): the multiplicative change in the expected count for a one-unit increase in that predictor. An IRR of 1.2 means the rate rises by about 20 percent, holding the other predictors fixed.
What if my data have far too many zeros?
Overdispersion and excess zeros are different problems. If a structural surplus of zeros remains after accounting for dispersion, a zero-inflated or hurdle count model is usually more appropriate than a plain negative binomial.
Related methods
Sources
Hilbe, J. M. (2011). Negative Binomial Regression (2nd ed.). Cambridge University Press.
Open DOI referenceThe Econometrics of Individual Risk: Credit, Insurance, and Marketing, p. 65