Why Combine Zero Inflation With Negative Binomial Counts?
A count outcome can have both more zeros than a Poisson model predicts and greater variability among counts than a Poisson distribution allows. A zero-inflated negative binomial (ZINB) model represents these features with two components: a process that can place an observation in a structural-zero state, and a negative binomial distribution for the count when that state does not apply. The components have distinct roles; neither should be interpreted as simply “the zero model” and “the positive-count model.”
The structural-zero component represents a latent state in which the outcome must be zero. The negative binomial component describes counts for observations outside that state, and it can itself generate zeros. Thus an observed zero does not reveal which component generated it. This mixture is useful in a GLMM when observations are clustered and the component predictors may include group-level random effects.
The Negative Binomial Parameterization and Mixture Probabilities
Use the mean-size parameterization in which a negative binomial random variable with mean \(\mu\) and size \(\theta\) has probability mass function
Under this parameterization, its variance is \(\mu+\mu^2/\theta\), and its probability of zero is \((\theta/(\theta+\mu))^\theta\). Smaller \(\theta\) allows greater dispersion beyond the Poisson variance. Keep the parameterization explicit: negative binomial software can use different parameters and conventions.
Let \(S_{ij}=1\) indicate the structural-zero state. Conditional on the predictors and random effects, \(P(S_{ij}=1)=\pi_{ij}\). If \(S_{ij}=1\), then \(Y_{ij}=0\); if \(S_{ij}=0\), then \(Y_{ij}\) follows the stated negative binomial distribution. By the law of total probability, the observed count probabilities are
The zero probability has two contributions: a structural zero and a zero generated by the negative binomial component. A positive count can come only from the negative binomial component. Consequently, \(\pi_{ij}\) is not the probability of observing zero, and \(\mu_{ij}\) is the mean within the negative binomial component, not the overall mean of the observed count.
Worked Example: Separating the Two Sources of Zeros
Suppose a hypothetical observation has structural-zero probability \(\pi=0.25\), and its negative binomial component has \(\mu=3\) and \(\theta=2\). Find the probability of observing zero and the probability of observing exactly two.
First calculate the negative binomial probability of zero:
An observed zero can arise from either component. Therefore,
For exactly two, only the negative binomial component contributes. Its probability is
Thus \(P(Y=2)=0.75(0.1728)=0.1296\). The multiplier \(0.75\) is the probability of being outside the structural-zero state; it is applied to every positive count probability.
Predictors and Random Effects in a ZINB GLMM
The two components may use different predictors. A common specification uses a logit link for the structural-zero probability and a log link for the negative binomial mean. For example,
Here \(\mathbf{z}_{ij}\) and \(\mathbf{x}_{ij}\) are the predictor vectors for the structural-zero and count components; they need not contain the same variables. The term \(E_{ij}\) is a positive exposure when a rate model is appropriate; if no exposure adjustment is needed, omit that term. The coefficients \(a_z\) and \(a_c\) determine how group-level random effects enter the components. The random effects can be separate or shared, with their dependence specified by their joint distribution. For example, a model may use normally distributed group effects with mean zero and an estimated covariance matrix.
Conditional on the random effects, observations are assumed independent unless the model specifies additional dependence. The negative binomial component is assumed to describe the non-structural counts adequately, and the link functions must match the intended relationships. For marginal predictions across groups, probabilities must be averaged over the random-effects distribution; substituting a zero random effect gives a conditional prediction for a group at that value, not generally the marginal prediction.
Worked Example: Writing Both Components for Clustered Counts
Suppose a hypothetical study records monthly event counts for individuals nested within clinics. Let \(T_{ij}\) indicate treatment and \(A_{ij}\) be age in years. Researchers want treatment and age predictors in both components, with clinic-specific intercepts. One possible model is
The clinic effects \((b^{(z)}_j,b^{(c)}_j)\) may be modeled jointly as mean-zero bivariate normal random effects, allowing the two clinic intercepts to be associated. The zero component predicts the odds of membership in the structural-zero state: holding other terms fixed, \(\exp(\gamma_1)\) is the multiplicative change in those odds for treatment versus the reference condition. The count component predicts the negative binomial mean among observations outside that state: \(\exp(\beta_1)\) is the conditional count-mean ratio for treatment versus reference, holding the other terms and random effect fixed.
Neither coefficient alone describes the change in the overall observed count distribution. Treatment can affect both the chance of the structural-zero state and the negative binomial mean. The resulting probability of zero combines both changes through the mixture formula.
Likelihood Contribution and a Conditional Random-Effect Calculation
The mixture probability directly gives each observation’s likelihood contribution conditional on its random effects. If \(y_{ij}=0\), its contribution is the sum of the two possible zero-generating probabilities. If \(y_{ij}>0\), its contribution is the negative binomial probability multiplied by the probability of being outside the structural-zero state:
This follows by conditioning on the latent state \(S_{ij}\) and summing over its two possible values. For a GLMM, the likelihood for observed data is obtained by integrating the conditional likelihood over the random-effects distribution. The conditional expression is not itself the marginal likelihood when random effects are present.
Worked Example: Zero Probability at a Given Random-Effect Value
For a hypothetical clinic, suppose the count predictor is \(\log(\mu)=\log(3)+0.4\), the negative binomial size is \(\theta=2\), and the structural-zero probability at the specified covariates and random effects is \(\pi=0.31\). Calculate the conditional probability of an observed zero.
The negative binomial mean is
The negative binomial probability of zero is therefore
Combining this sampling-zero probability with the structural-zero probability gives
This is conditional on the stated covariates and random effects. It is not the probability averaged over all clinics. The calculation also shows why the observed zero probability exceeds \(0.31\): the negative binomial component supplies additional zeros.
Assumptions, Diagnostics, and Alternatives
A ZINB GLMM is most defensible when its two components have meaningful roles and the conditional count distribution is suitable. The structural-zero state must represent a plausible latent condition that makes the count zero; it should not be introduced solely because a data set contains many zeros. The negative binomial component must account adequately for the count distribution among observations not in that state, including its dispersion and covariate structure. Random effects should reflect the grouping and dependence present in the data.
Useful checks include comparing observed and fitted zero frequencies, examining fitted versus observed frequencies across positive counts, and checking whether the model captures the upper tail. These checks should be made across relevant covariate patterns and groups, not only for the pooled data. Inspect convergence and parameter estimates as well: estimates at extreme values, large uncertainty, or sensitivity to starting values can indicate that the data do not support the proposed model structure. A good match to the overall zero proportion alone does not establish that the two components are well specified.
| Model | What it allows | Key distinction from ZINB |
|---|---|---|
| Negative binomial GLMM | Overdispersed counts, including zeros generated by the count distribution | No separate structural-zero state |
| Zero-inflated Poisson GLMM | A structural-zero state plus a Poisson count component | The count component does not have negative binomial dispersion |
| Zero-inflated negative binomial GLMM | A structural-zero state plus an overdispersed count component | Both sources can contribute zeros |
These models are alternatives, not automatic upgrades from one to another. The ZINB model has more parameters and its components can be difficult to distinguish when the data provide limited information. Its flexibility does not guarantee a more reliable explanation. Interpret the two components in context, assess predictive performance, and consider whether the assumed structural-zero mechanism is scientifically plausible. The earlier material on zero-inflated Poisson models provides the simpler Poisson count-component case; the negative binomial component changes the count distribution, not the meaning of the structural-zero state.
Common Mistakes and Key Takeaway
- Calling \(\pi\) the probability of an observed zero. It is the probability of the structural-zero state. The observed zero probability adds zeros from the negative binomial component.
- Calling \(\mu\) the overall mean count. It is the mean of the negative binomial component. Overall predictions must account for the probability \(1-\pi\) of entering that component.
- Interpreting a positive count as evidence that the mixture is unnecessary. Positive counts do not identify which model is appropriate; they contribute information about the negative binomial component.
- Using a conditional prediction as a population-average prediction. In a GLMM, predictions at fixed random effects and predictions averaged over random effects are different quantities.
Check Your Understanding
Answer each question, then compare with the brief solutions.
- If \(\pi=0.20\) and the negative binomial component has probability \(0.10\) of zero, what is the observed probability of zero?
- For a positive count \(y\), why is its ZINB probability multiplied by \(1-\pi\)?
- What does \(\exp(\beta_1)\) represent in a log-mean count predictor, holding the other terms and random effects fixed?
- Why does a prediction at random effects equal to zero not generally equal the prediction averaged over groups?
Solutions. 1. \(0.20+(1-0.20)(0.10)=0.28\). 2. A positive count is possible only when the observation is outside the structural-zero state, which has probability \(1-\pi\). 3. It is the multiplicative ratio of the negative binomial component means for a one-unit increase in that predictor, conditional on the stated terms. 4. The marginal prediction averages the conditional prediction over the random-effects distribution; because the model links are nonlinear, evaluating at a mean random effect does not generally perform that average.