Tutorials › Generalized Linear Mixed Models (GLMM) › Apparent Zero Inflation From Unmodeled Heterogeneity

Overdispersion and Zero Inflation · Tutorial 554 of 698

Apparent Zero Inflation From Unmodeled Heterogeneity

Learn to distinguish apparent excess zeros caused by heterogeneity or a poor count model from zeros that require a separate structural-zero process.

Advanced 12 min read

What You'll Learn

  • Derive why variation in Poisson rates increases the marginal probability of zero.
  • Connect omitted predictors and group effects to apparent zero inflation.
  • Calculate zero probabilities under a gamma-mixed Poisson model.
  • Assess a zero-count discrepancy without treating it as proof of structural zeros.
  • Compare heterogeneity-based explanations with a zero-inflated Poisson model.
  • Recognize diagnostics and limitations when diagnosing excess zeros.

Why a Poisson Model Can Predict Too Few Zeros

A dataset can contain more zero counts than a fitted Poisson model predicts even when every observation comes from an ordinary count process and no unit belongs to a distinct, permanently-zero class. The key possibility is unmodeled heterogeneity: observations may have different underlying rates because of omitted predictors, group differences, or variation not captured by the assumed count distribution. Low-rate observations produce zeros often; averaging them with high-rate observations can yield a high overall zero fraction.

The distinction matters because a large zero residual is a feature of the observed distribution, not by itself evidence of a particular mechanism. A zero-inflated model represents one explanation by adding a structural-zero component. But heterogeneity in an ordinary count model can also create excess zeros relative to a homogeneous Poisson benchmark. Model interpretation should therefore follow investigation of the rate structure and count distribution, not just a comparison of the observed zero fraction with one Poisson prediction.

Definition: Apparent zero inflation is an observed or model-implied excess of zeros relative to a specified reference model, such as a homogeneous Poisson model. The phrase describes a discrepancy from that reference; it does not establish that observations arise from a separate structural-zero process.

Rate Heterogeneity Raises the Marginal Zero Probability

Suppose a count \(Y_i\) is Poisson conditional on its rate \(\Lambda_i\), with \(Y_i\mid\Lambda_i\sim\operatorname{Poisson}(\Lambda_i)\). Each unit has a positive rate, but rates vary across units. Conditional on a particular rate, the probability of a sampling zero is \(e^{-\Lambda_i}\). Averaging over the distribution of rates gives the marginal zero probability:

$$ P(Y_i=0)=E\left[e^{-\Lambda_i}\right]. $$

The function \(e^{-x}\) is strictly convex because its second derivative is \(e^{-x}>0\). Jensen's inequality therefore gives

$$ E\left[e^{-\Lambda_i}\right]\geq e^{-E(\Lambda_i)}. $$

The right-hand side is the zero probability of a Poisson distribution whose rate equals the average rate. Thus, holding the marginal mean fixed, variation in the Poisson rate cannot lower the zero probability below that homogeneous Poisson benchmark. If the rate is genuinely variable, the inequality is strict. This argument does not say that every heterogeneous model has more zeros than every fitted model; it compares the mixture to a Poisson distribution with the same mean.

Key result: If \(Y\mid\Lambda\sim\operatorname{Poisson}(\Lambda)\), then \(E(Y)=E(\Lambda)\) and \(P(Y=0)=E[e^{-\Lambda}]\geq e^{-E(\Lambda)}\). Heterogeneous Poisson rates produce at least as many marginal zeros as a homogeneous Poisson model with the same mean.

In a GLMM, one common source of rate variation is a group random intercept. For counts \(Y_{ij}\) in group \(j\), a conditional model might be

$$ Y_{ij}\mid b_j\ \sim\ \operatorname{Poisson}(\lambda_{ij}),\qquad \log(\lambda_{ij})=x_{ij}^{\mathsf T}\beta+b_j. $$

Here \(x_{ij}\) is the covariate vector, \(\beta\) is the fixed-effect coefficient vector, and \(b_j\) is a group-specific random intercept. A standard formulation assumes the random effects are independent across groups, have mean zero and a specified distribution (often normal), and are independent of the covariates; conditional on the random effects and covariates, the counts are independent Poisson. The marginal zero probability averages \(e^{-\lambda_{ij}}\) over the random-effect distribution. Unmodeled group variation can therefore make zeros more frequent than a Poisson model that uses only a common rate or fixed effects predicts. With repeated counts within a group, a shared \(b_j\) also induces marginal dependence between those counts.

Three Ways Heterogeneity Can Be Missed

The rate mixture argument applies to several practical situations. First, omitting an important predictor can leave observations with different conditional means pooled together. Second, ignoring group-level variation can make the fitted model treat distinct groups as if they had the same rate. Third, an incorrect count distribution can impose too little variability. For example, a negative binomial count distribution can represent overdispersion relative to a Poisson distribution without introducing structural zeros. The relevant question is not simply whether zeros are numerous, but whether the model has represented the sources of variation that determine their probability.

Worked Example: An Omitted Predictor Creates Many Zeros

Hypothetical data-generating setup. Half of a population has a Poisson count rate of \(0.2\) events per observation, and half has a rate of \(3.8\). Assume counts are independent conditional on the group, and suppose the group indicator is omitted. Both rates are positive, so zeros in either group are sampling zeros.

The marginal mean is

$$ E(Y)=0.5(0.2)+0.5(3.8)=0.1+1.9=2.0. $$

A homogeneous Poisson model with that mean predicts

$$ P_{\text{Poisson}}(Y=0)=e^{-2.0}=0.1353. $$

But averaging the conditional zero probabilities across the two groups gives

$$ P(Y=0)=0.5e^{-0.2}+0.5e^{-3.8} =0.5(0.8187)+0.5(0.02237) =0.4205. $$

The omitted group indicator makes the pooled zero probability about \(42.1\%\), rather than the \(13.5\%\) predicted by a homogeneous Poisson model with the same mean. The low-rate group contributes many zeros. This difference does not require a structural-zero group: each observation has a positive Poisson rate and can produce a positive count.

The assumptions used in this calculation are explicit: the two groups have the stated rates, their population proportions are each one half, and counts follow their group-specific Poisson distributions. If the observed groups or proportions differed, the marginal calculation would need to use those rates and weights instead.

A Gamma-Mixed Poisson Gives an Exact Illustration

A second illustration makes the role of continuous rate variation explicit. Suppose \(\Lambda\) has a gamma distribution with shape \(k\) and rate \(k/\mu\), so \(E(\Lambda)=\mu\). Conditional on \(\Lambda\), let \(Y\) be Poisson. This is a gamma-Poisson mixture, whose marginal count distribution is negative binomial. Its zero probability can be derived directly from the gamma density:

$$ \begin{aligned} P(Y=0) &=E[e^{-\Lambda}]\\ &=\int_0^\infty e^{-\lambda} \frac{(k/\mu)^k}{\Gamma(k)} \lambda^{k-1}e^{-(k/\mu)\lambda}\,d\lambda\\ &=\left(\frac{k/\mu}{k/\mu+1}\right)^k =\left(1+\frac{\mu}{k}\right)^{-k}. \end{aligned} $$

The integral uses the gamma integral \(\int_0^\infty \lambda^{k-1}e^{-a\lambda}\,d\lambda=\Gamma(k)/a^k\) for \(a>0\). The marginal variance is \(\operatorname{Var}(Y)=\mu+\mu^2/k\), which exceeds the Poisson variance \(\mu\) for finite positive \(k\). As \(k\) increases, the rate becomes less variable and the mixture approaches a Poisson model.

Worked Example: Comparing Poisson and Gamma-Mixed Zero Probabilities

Hypothetical model comparison. Let the marginal mean be \(\mu=2\) counts per observation and let the gamma shape be \(k=1\). The homogeneous Poisson benchmark predicts

$$ P_{\text{Poisson}}(Y=0)=e^{-2}=0.1353. $$

For the gamma-mixed model, the calculation is

$$ P_{\text{mixed}}(Y=0)=\left(1+\frac{2}{1}\right)^{-1} =3^{-1}=0.3333. $$

The mixture predicts \(33.3\%\) zeros, despite having the same mean of 2 counts per observation. Its marginal variance is \(2+2^2/1=6\) counts squared, compared with variance 2 under the Poisson benchmark. This is a distributional alternative that represents rate heterogeneity and overdispersion; the calculation does not assign any observation to a structural-zero class.

The model assumes the gamma mixing distribution and a Poisson count distribution conditional on the rate. A good numerical match to the zero fraction alone would not verify those assumptions: other count distributions or omitted covariates might produce similar zero probabilities.

Diagnosing an Apparent Excess of Zeros

A useful diagnostic begins with a clearly stated reference model and its assumptions. For a fitted Poisson model, compare observed zeros with the expected number under its predicted probabilities, but also inspect the whole count distribution and the model's residual patterns. In grouped data, check whether residuals or zero rates vary systematically by group. Check whether plausible omitted covariates predict differences in exposure or event rates. If dispersion remains after relevant predictors and grouping are represented, consider whether the conditional Poisson distribution is still too restrictive.

A simple observed-versus-expected comparison is descriptive, not a stand-alone test of a structural-zero mechanism. Its uncertainty depends on fitted parameters, dependence among observations, and the model-fitting process. When a formal calibration is needed, a parametric bootstrap can be used: simulate datasets under the fitted reference model, refit the model in each simulation using the same procedure, and compare the observed zero discrepancy with the simulated discrepancies. This accounts for estimation and can preserve the grouping structure if the simulations reproduce it.

Worked Example: Reading a Zero-Count Discrepancy Carefully

Hypothetical diagnostic calculation. Consider 100 independent observations for which a reference Poisson model with known mean \(\mu=2\) is used as a benchmark. It predicts \(P(Y=0)=e^{-2}=0.1353\), so the expected number of zeros is

$$ 100(0.1353)=13.53. $$

Suppose 35 zeros are observed. If the zero indicators were independent Bernoulli variables with this fixed probability, the standard deviation of their total would be

$$ \sqrt{100(0.1353)(1-0.1353)} =\sqrt{11.70} =3.420. $$

The observed discrepancy is \((35-13.53)/3.420=6.278\) standard deviations above this simple benchmark. This flags a substantial mismatch under the stated assumptions; it does not establish why the mismatch occurred.

In an actual fitted GLMM, the mean is typically estimated, observations may share group effects, and covariates may alter individual probabilities. Consequently, the simple calculation above is not a calibrated significance test for that setting. The analyst should examine group-level fit and other count frequencies, and use simulation that reflects the fitted model and its estimation when formal calibration is required.

Distinguishing Explanations and Recognizing Limits

A zero-inflated Poisson model and a heterogeneous Poisson or negative binomial model can both predict more zeros than a homogeneous Poisson model. They differ in their assumptions about how the distribution arises. A zero-inflated model adds a component in which an observation is in a structural-zero state; the ordinary count component can also generate sampling zeros. A mixed count model instead allows rates to vary, with zeros arising from the conditional count distribution. A negative binomial model is one standard way to represent extra-Poisson variation in the marginal count distribution. These models may fit similar marginal zero frequencies while implying different latent explanations.

A practical comparison should consider more than the number of zeros. Assess predicted frequencies across the full count range, variation among groups, conditional relationships with covariates, and whether model assumptions are scientifically plausible. The earlier material on identifiability in zero-inflated count models is relevant: similar observed distributions can make distinct latent explanations difficult to distinguish. A model-selection result cannot, by itself, prove that a latent structural-zero state exists.

  • Do not equate excess zeros with structural zeros. The zero fraction can be high because many observations have low rates.
  • Do not rely on the pooled mean alone. Two populations with the same mean can have very different zero probabilities when their rates vary differently.
  • Do not ignore dependence. Shared group effects can make counts within a group dependent, invalidating calculations that assume independent observations.
  • Do not choose a model from one diagnostic alone. Zero counts, dispersion, covariate patterns, and group structure all provide evidence about fit.

The heterogeneity explanation also has limits. A random-effects distribution may be misspecified; a gamma mixture, a lognormal random intercept, and omitted fixed predictors do not imply identical marginal distributions. Sparse data may provide little information about the shape of that distribution. Moreover, adding complexity can make estimates unstable or difficult to interpret. The objective is not to select the most flexible model automatically, but to use a plausible structure that represents the design and the scientific sources of variation.

Key takeaway: A high zero fraction is evidence of a mismatch only relative to a stated reference model. Before attributing zeros to a separate structural process, investigate omitted predictors, group-level variation, and the adequacy of the conditional count distribution.

Check Your Understanding

Answer each question, then compare your reasoning with the solutions.

  1. A Poisson count has a random rate \(\Lambda\) with \(E(\Lambda)=1.5\). Explain how its marginal zero probability compares with \(e^{-1.5}\), and state the condition for a strict inequality.
  2. Half of a hypothetical population has Poisson rate \(0.5\), and half has rate \(2.5\). Calculate the marginal mean and zero probability. Compare the result with the homogeneous Poisson zero probability at that mean.
  3. For a gamma-Poisson mixture with \(\mu=3\) and \(k=2\), calculate the zero probability and marginal variance.
  4. Why does observing many more zeros than a fitted homogeneous Poisson model predicts not prove that structural zeros exist? Name two alternative explanations.

Solutions. (1) Jensen's inequality gives \(P(Y=0)=E(e^{-\Lambda})\geq e^{-E(\Lambda)}=e^{-1.5}=0.2231\). The inequality is strict if \(\Lambda\) is nonconstant. (2) The mean is \(0.5(0.5)+0.5(2.5)=1.5\). The marginal zero probability is \(0.5e^{-0.5}+0.5e^{-2.5}=0.3443\), whereas the homogeneous Poisson probability is \(e^{-1.5}=0.2231\). (3) The zero probability is \((1+3/2)^{-2}=2.5^{-2}=0.1600\). The marginal variance is \(3+3^2/2=7.5\) counts squared. (4) The discrepancy can arise from unmodeled rate heterogeneity, such as omitted predictors or group effects, or from an inadequate conditional count distribution such as a Poisson model used when there is overdispersion. A zero-count discrepancy alone does not identify which explanation is correct.

Clinical Biostats