Author-reviewedEvidence: highv1.0.1

Negative Binomial Regression

Negative binomial regression models counts of health care use, such as admissions or exacerbations, whose variance is larger than a Poisson model allows.

Status
Published, version 1.0.1
Last reviewed
27 Oct 2026, by Dr Darrin Baines
Report a problem
Tell us if something is wrong or out of date

Concept Architecture

Negative Binomial Regression for Health Care Use and Event Rates

Negative binomial regression is a regression model for counts of health care events, such as GP consultations, hospital admissions or exacerbations of a chronic disease, in which some patients have far more events than others. It keeps the log link and rate ratios of Poisson regression but adds one parameter that lets the variance of the count grow faster than its mean. In health economics it supplies the event rates and rate ratios that drive resource use and costs in trial-based and model-based cost-effectiveness analysis. The extra parameter matters because a Poisson fit to the same data usually reports standard errors that are too small, so treatment effects look more certain than they are. It is a generalised linear model fitted by maximum likelihood estimation.

Why health care counts outgrow the Poisson model

A Poisson model assumes that the variance of a count equals its mean, which holds when every patient with the same covariates shares one underlying event rate. Real patients differ in severity, frailty and habits that no dataset records in full, so the observed counts spread out more than that. Gardner, Mulvey and Shaw describe the Poisson model as likely to mislead unless restrictive assumptions are met, because individual counts are usually more variable, or overdispersed, than the model implies.

The Stata reference manual explains that overdispersion comes about when some of the causes of the Poisson process are unknown. It describes underdispersion, a variance below the mean, as uncommon, and the negative binomial model does not help with it.

Cameron and Trivedi, in a 1986 paper on count data models, applied their estimators and tests to the number of doctor consultations. Jones, reviewing models for health care, notes that the Poisson model and extensions such as the negative binomial are often used in health economics to model the number of visits to a doctor.

The model as a Poisson process with a gamma-distributed frailty

The usual derivation gives each patient a personal Poisson rate. The mean rate depends on covariates through a log link, and an unobserved multiplier with mean one scatters individual rates around it.

yi∣νi∼Poisson(νiμi),ln⁡μi=β0+β1x1i+⋯+βkxki+ln⁡ti,νi∼Gamma(1/α, α)y_i \mid \nu_i \sim \text{Poisson}(\nu_i \mu_i), \qquad \ln \mu_i = \beta_0 + \beta_1 x_{1i} + \dots + \beta_k x_{ki} + \ln t_i, \qquad \nu_i \sim \text{Gamma}(1/\alpha,\ \alpha)

where yiy_i is the observed count for patient ii, μi\mu_i is the expected count, x1ix_{1i} to xkix_{ki} are the covariates, β0\beta_0 to βk\beta_k are the regression coefficients, tit_i is the follow-up time entering as an offset, νi\nu_i is the unobserved multiplier, gamma-distributed with shape 1α\tfrac{1}{\alpha} and scale α\alpha so that its mean is one, and α\alpha is the overdispersion parameter, which is the variance of νi\nu_i.

The Stata manual shows that this gamma mixture of Poisson variables gives a negative binomial distribution for the count.

Pr⁡(yi)=Γ(m+yi)Γ(yi+1) Γ(m) pi m(1−pi)yi,pi=11+αμi,m=1α\Pr(y_i) = \frac{\Gamma(m + y_i)}{\Gamma(y_i + 1)\,\Gamma(m)}\, p_i^{\,m} (1 - p_i)^{y_i}, \qquad p_i = \frac{1}{1 + \alpha \mu_i}, \qquad m = \frac{1}{\alpha}

where Γ\Gamma is the gamma function, pip_i is a probability that falls as the expected count μi\mu_i rises, and mm is the inverse of the overdispersion parameter α\alpha.

Two ways of letting the variance grow

The mean and variance follow directly from the mixture. In the form above, known as NB2 in the terminology of Cameron and Trivedi and as the mean-dispersion model in Stata, the variance rises with the square of the mean.

E(yi)=μi,Var(yi)=μi(1+αμi)\mathrm{E}(y_i) = \mu_i, \qquad \mathrm{Var}(y_i) = \mu_i (1 + \alpha \mu_i)

where μi\mu_i is the expected count and α\alpha is the overdispersion parameter. The Poisson model is the special case α=0\alpha = 0, and the larger α\alpha is, the greater the overdispersion.

The alternative NB1, or constant-dispersion, model sets the variance to μi(1+δ)\mu_i (1 + \delta), a fixed multiple of the mean for every patient, where δ\delta is its dispersion parameter. Some texts write NB2 with r=1/αr = 1/\alpha, so the variance appears as μi+μi2/r\mu_i + \mu_i^2 / r. A reported dispersion value therefore cannot be read without knowing which notation was used. Hilbe's book on the model gives alternative variance parameterisations a chapter of their own.

Estimation, exposure and the test for overdispersion

The coefficients and the dispersion parameter are estimated together by maximising the log-likelihood. Stata searches over ln⁡α\ln \alpha because α\alpha must be greater than zero.

Follow-up often differs between patients. The log of each patient's time at risk enters the linear predictor with its coefficient fixed at one, which the Stata manual calls an exposure variable. The coefficients then describe event rates per unit of time, not counts per patient.

Whether a negative binomial model is needed can be tested with a likelihood ratio test of α=0\alpha = 0 against the Poisson fit. The manual explains that this test sits on the boundary of the parameter space, so the usual normal-theory test is omitted and the null distribution of the likelihood ratio statistic is an equal mixture of a point mass at zero and a chi-squared distribution with one degree of freedom. The Akaike information criterion is often used alongside it when comparing count models that are not nested.

Reading the coefficients as rate ratios

Because of the log link, each coefficient acts multiplicatively on the expected rate. Exponentiating a coefficient gives an incidence rate ratio, the ratio of expected event rates for a one-unit change in that covariate with the others held fixed.

IRRj=eβj\mathrm{IRR}_j = e^{\beta_j}

where IRRj\mathrm{IRR}_j is the incidence rate ratio for covariate jj and βj\beta_j is its coefficient. A treatment coefficient of minus 0.223 gives a rate ratio of 0.80, a 20% lower event rate at any level of the other covariates. The dispersion parameter adds what the rate ratio leaves out, how unevenly events fall across patients.

Worked example with exacerbation counts in a two-arm trial

All numbers in this example are illustrative. A trial randomises 200 patients with chronic lung disease to usual care and 200 to a self-management programme, and counts moderate or severe exacerbations over follow-up. An NB2 model with a log follow-up offset is fitted.

ln⁡μi=0.405−0.223 Ti+ln⁡ti,α^=0.8\ln \mu_i = 0.405 - 0.223\, T_i + \ln t_i, \qquad \hat{\alpha} = 0.8

where μi\mu_i is the expected number of exacerbations for patient ii, TiT_i is 1 for the programme and 0 for usual care, tit_i is follow-up in years and α^\hat{\alpha} is the estimated overdispersion parameter.

1. Convert the coefficients. The usual-care rate is e0.405=1.50e^{0.405} = 1.50 exacerbations per patient-year. The rate ratio is e−0.223=0.80e^{-0.223} = 0.80, so the programme rate is 1.50 × 0.80 = 1.20 per patient-year.

2. Use the offset. A usual-care patient who withdrew after six months has ln⁡ti=ln⁡0.5=−0.693\ln t_i = \ln 0.5 = -0.693, so the expected count is 1.50 × 0.5 = 0.75.

3. Compare the variances. Over one year, the usual-care factor is 1 + 0.8 × 1.5 = 2.2, so NB2 gives a variance of 1.5 × 2.2 = 3.30, against 1.50 under a Poisson model. For the programme arm the factor is 1 + 0.8 × 1.2 = 1.96 and the variance is 1.2 × 1.96 = 2.352, against 1.20.

4. Compare the share with no exacerbations. Under NB2 the probability of a zero count is (1+αμ)−1/α(1 + \alpha \mu)^{-1/\alpha}. For usual care this is (2.2)−1.25=0.373(2.2)^{-1.25} = 0.373, against e−1.5=0.223e^{-1.5} = 0.223 under Poisson. The negative binomial predicts that about 37% of usual-care patients have a year free of exacerbations.

5. Compare the precision of the rate ratio. With equal one-year follow-up the variance of the log rate in each arm is approximately 1nμ+αn\frac{1}{n\mu} + \frac{\alpha}{n}, where nn is the number of patients in the arm. For usual care the two terms are 1/300 = 0.00333 and 0.8/200 = 0.004, which sum to 0.00733. For the programme they are 1/240 = 0.00417 and 0.004, which sum to 0.00817. The variance of the log rate ratio is their sum, 0.0155, so the standard error is 0.1245. A Poisson analysis drops the α/n\alpha/n terms, giving 0.00333 + 0.00417 = 0.0075 and a standard error of 0.0866.

6. Compare the intervals. The negative binomial 95% interval for the log rate ratio is minus 0.223 plus or minus 1.96 × 0.1245 = 0.244, or minus 0.467 to 0.021, which is a rate ratio of 0.63 to 1.02. The Poisson interval is minus 0.223 plus or minus 1.96 × 0.0866 = 0.170, or minus 0.393 to minus 0.053, a rate ratio of 0.68 to 0.95. The same estimate looks conclusive under Poisson and uncertain once patients are allowed to differ.

7. Turn rates into costs. At an illustrative GBP 1,200 per exacerbation, expected costs are 1.50 × 1,200 = GBP 1,800 per patient-year under usual care and 1.20 × 1,200 = GBP 1,440 on the programme, a saving of GBP 360. The mean saving is the same under either model, but the standard error of the log rate ratio behind it is 0.1245 / 0.0866 = 1.44 times as large under the negative binomial.

Using negative binomial results in cost-effectiveness work

In an economic evaluation the expected rate per arm, multiplied by unit costs and by the QALY loss per event, gives the mean costs and outcomes. The rate ratio and its standard error typically feed a decision model, where the log rate ratio is drawn from a normal distribution in probabilistic sensitivity analysis. A Poisson standard error used at that point understates decision uncertainty and the value of further research.

Respiratory trials show why the choice matters. Keene and colleagues, analysing exacerbations in the TRISTAN trial of 1,465 patients with chronic obstructive pulmonary disease, found that the key assumptions of Poisson regression often appear unreasonable for exacerbation data. They favoured a negative binomial model, which corresponds to assuming a separate Poisson parameter for each patient. Suissa, using a cohort of 5,454 patients with the disease arranged to emulate a trial, showed that ignoring between-patient variability in exacerbation rates turned a rate ratio of 0.79 with a p-value of 0.12 into one with a p-value of 0.0007.

Choosing between negative binomial and neighbouring count models

The negative binomial is one of several answers to overdispersion. Each alternative changes a different part of the model.

  1. Poisson with robust standard errors. Jones notes that the Poisson estimator is consistent so long as the mean is correctly specified, even if the variance is wrong, with sandwich estimator standard errors replacing the model-based ones. This gives valid rate ratios but no credible predicted distribution of counts per patient.
  2. Overdispersed or quasi-Poisson models. Gardner and colleagues describe a scale factor that corrects the inferential statistics instead of adding a random term for each patient.
  3. Zero-inflated and hurdle models. Mihaylova and colleagues describe two-part models with a truncated negative binomial for users, and report that zero-inflated Poisson and negative binomial models can fail to converge if the same covariates are used in both parts.
  4. Finite mixtures. Deb and Trivedi fitted a negative binomial finite mixture model to six measures of medical care demand by older people and found it preferred to the standard and hurdle versions, with two latent groups described as healthy and ill.
  5. Repeated counts per patient. Counts recorded over several periods for the same patient are correlated, which generalised estimating equations or a mixed-effects model can handle.
  6. Time-to-event analysis. Keene and colleagues note that clinical interest in a direct comparison of rates favours a count-based analysis over multiple time-to-event methods.

Common misreadings and limits

Most errors come from treating the dispersion parameter as a nuisance or from reading coefficients on the wrong scale. A few are specific to count data.

  1. Reading a coefficient as a count. A coefficient of minus 0.223 is a 20% lower rate, and the number of events avoided depends on the baseline rate and follow-up.
  2. Ignoring follow-up time. Without an exposure offset, patients who leave early look like low users and the rate ratio is biased whenever follow-up differs between the arms.
  3. Reporting a dispersion value without its parameterisation. An α\alpha of 0.8 under NB2 is r=1.25r = 1.25 in the inverse notation.
  4. Testing overdispersion against the ordinary chi-squared. The boundary problem makes that test conservative.
  5. Treating the model as a cure for every zero or underdispersion. Structural zeros may still need a two-part model, and a variance below the mean is outside its scope.

Sources

Library

Publications

1
  • Book

    Statistical Analysis of Cost-Effectiveness Data — Willan & Briggs, 1st Edition ed., 2006 (John Wiley & Sons)

    A synthesis of statistical methods for analysing cost-effectiveness data, including net-benefit regression, confidence intervals for the ICER, cost-effectiveness acceptability curves, and covariate adjustment. Part of the Wiley Statistics in Practice series.

Frequently Asked Questions (6)

  • What is negative binomial regression?

    Negative binomial regression models counts of health care use, such as admissions or exacerbations, whose variance is larger than a Poisson model allows.

    Source: Hilbe 2011

  • When is negative binomial regression chosen for count outcomes?

    Overdispersion is the usual reason, meaning that counts such as hospital admissions vary more between patients than their mean would allow under a Poisson model. Gardner and colleagues warn that Poisson regression is likely to mislead unless restrictive assumptions are met, because individual counts are usually more variable than the model implies. Negative binomial regression meets the problem by adding a random term for unexplained differences between patients, so its standard errors are not artificially small. The overdispersed Poisson model is the simpler alternative, correcting the inferential statistics with an estimated scale factor instead.

    Source: Gardner et al. 1995

  • How does negative binomial regression work?

    Each patient is given a personal Poisson rate, equal to a covariate-driven mean multiplied by an unobserved gamma-distributed factor with mean one and variance alpha. Mixing Poisson counts over that gamma factor gives a negative binomial distribution for the count, whose variance is the mean multiplied by one plus alpha times the mean. The log of the expected count is a linear function of the covariates, and the log of follow-up time can enter as an exposure term with its coefficient fixed at one. The coefficients and alpha are estimated together by maximum likelihood, with Stata searching over the log of alpha because alpha must be positive.

    Source: StataCorp 2025

  • When is negative binomial regression used?

    Health economists apply the model to counts of health care events, such as exacerbations of a chronic lung disease, in which some patients have far more events than others. Keene and colleagues, analysing exacerbations in the TRISTAN trial of 1,465 patients with chronic obstructive pulmonary disease, found the key Poisson assumptions often unreasonable for such data. They favoured a negative binomial model, which corresponds to a separate Poisson parameter for each patient. The resulting event rates and rate ratios then feed the costs and decision uncertainty of a cost-effectiveness analysis.

    Source: Keene et al. 2007

  • How does negative binomial regression differ from Poisson regression?

    Poisson regression assumes that the variance of a count equals its mean, while the negative binomial adds a dispersion parameter that lets the variance grow faster than the mean. The two share the log link and the reading of coefficients as rate ratios, and the Poisson model is the special case in which the dispersion parameter is zero. Jones notes that the Poisson estimator stays consistent when the mean is correctly specified, even if the variance is wrong, with sandwich standard errors then replacing the model-based ones. The negative binomial also predicts how events are spread across patients, including the share with no events at all.

    Source: Jones 2010

  • How are the results of negative binomial regression interpreted?

    Exponentiating a coefficient gives an incidence rate ratio, the ratio of expected event rates for a one-unit change in that covariate with the others held fixed. A treatment coefficient of minus 0.223, for example, gives a rate ratio of 0.80, which is a 20% lower event rate, while the number of events avoided still depends on the baseline rate and follow-up. The dispersion parameter describes how unevenly events fall across patients. Its value can only be read once the parameterisation is known, since an alpha of 0.8 in the usual NB2 form appears as 1.25 in the inverse notation.

    Source: StataCorp 2025

Trust Record

Verified by Dr Darrin Baines

British health economist

Professional identity: darrinbaines.org

Verification date: 27 Oct 2026

Content version: 1.0.1

Canonical Identity

Term code
HE-ES-SA-136

Stable URI · Machine-readable · Resolvable · CC BY 4.0