Tutorials › Generalized Linear Mixed Models (GLMM) › Interpreting Latent Zero-Class Probabilities

Overdispersion and Zero Inflation · Tutorial 569 of 698

Interpreting Latent Zero-Class Probabilities

Learn to calculate and interpret posterior structural-zero probabilities in zero-inflated count models, including models with latent group effects.

Advanced 12 min read

What You'll Learn

  • Distinguish a latent structural-zero class from an observed zero count.
  • Derive the posterior structural-zero probability for an observed zero.
  • Integrate over random effects rather than treating them as known.
  • Compare posterior probabilities for zeros with different count-process means.
  • Interpret summed posterior probabilities without assigning definite individual labels.
  • Identify limitations of plug-in posterior probabilities and ways to check model fit.

Observed Zeros and Latent Classes

A zero-inflated model describes zeros as arising from two possible sources: a structural-zero class, whose members always have a zero count, and a count-generating class that can produce either zero or a positive count. The observed value \(Y_i=0\) does not reveal which source produced it. The model can quantify uncertainty about that source, but it does not make the unobserved class membership known.

This distinction matters especially in a generalized linear mixed model. Even after estimating the regression coefficients, the relevant count mean for an observation may depend on an unobserved group effect. A posterior class probability must then account for uncertainty about that effect as well as uncertainty about the latent class.

Definition: Let \(Z_i=1\) indicate that observation \(i\) belongs to the structural-zero class, and let \(Z_i=0\) indicate that it belongs to the count-generating class. In a zero-inflated model, \(P(Z_i=1\mid b)=\pi_i(b)\), and \(Y_i=0\) whenever \(Z_i=1\). If \(Z_i=0\), the count has probability mass function \(f(y\mid \mu_i(b),\theta)\), which may itself assign positive probability to zero. For an observed zero, the posterior structural-zero probability is \(P(Z_i=1\mid Y_i=0,\text{model information})\).

Here \(b\) denotes the relevant random effects, \(\pi_i(b)\) the structural-zero probability, and \(\mu_i(b)\) the mean of the count-generating distribution. A common specification uses a logit link for \(\pi_i(b)\) and a log link for \(\mu_i(b)\); covariates and random effects may enter either component. The count distribution must be specified, and its zero probability is \(f(0\mid\mu_i(b),\theta)\). The formulas below assume the two latent classes are mutually exclusive, structural-class observations are always zero, and observations are conditionally independent given the random effects and model parameters. For a GLMM, the random effects have a specified distribution, commonly a multivariate normal distribution.

The Posterior Probability for a Zero

First suppose the random effects and model parameters are fixed at given values. Bayes’ rule compares the probability of a zero from the structural class with the probability of a zero from either class. The structural class contributes \(\pi_i(b)\); the count-generating class contributes \((1-\pi_i(b))f(0\mid\mu_i(b),\theta)\).

$$ P(Z_i=1\mid Y_i=0,b) = \frac{\pi_i(b)} {\pi_i(b)+(1-\pi_i(b))f(0\mid\mu_i(b),\theta)}. $$

The denominator is the model probability of observing a zero, conditional on \(b\). The numerator is the joint probability of structural-class membership and a zero; because the structural class always produces zero, that joint probability is just \(\pi_i(b)\). A positive observed count has posterior structural-zero probability zero under this model: \(P(Z_i=1\mid Y_i=y,b)=0\) for \(y>0\).

When random effects are uncertain, substituting a single estimated value of \(b\) is not, in general, the same as integrating over their uncertainty. Let \(D_{-i}\) denote the other observations that inform the relevant random effects, and let the distribution of \(b\) conditional on \(D_{-i}\) represent that information. Conditional independence gives the integrated probability for a zero and the integrated structural-class contribution:

$$ P(Z_i=1\mid Y_i=0,D_{-i}) = \frac{ E\{\pi_i(b)\mid D_{-i}\} }{ E\{\pi_i(b)+(1-\pi_i(b))f(0\mid\mu_i(b),\theta)\mid D_{-i}\} }. $$

This expression averages the numerator and denominator contributions over the relevant random-effects distribution and then takes their ratio. It is not generally the average of the conditional probabilities \(P(Z_i=1\mid Y_i=0,b)\). If the target observation is the only information about its group effect, the distribution used for integration is the random-effects distribution given the covariates and model, rather than an update based on other observations in that group.

Worked Example: A Poisson Zero With Fixed Model Values

Suppose a hypothetical zero-inflated Poisson model assigns an observation structural-zero probability \(\pi_i=0.30\). In the count-generating class, its Poisson mean is \(\mu_i=2\). Treat these model values as fixed for this calculation. The Poisson probability of zero is \(f(0)=e^{-2}\approx0.1353\), so Bayes’ rule gives

$$ P(Z_i=1\mid Y_i=0) = \frac{0.30}{0.30+(1-0.30)e^{-2}} = \frac{0.30}{0.30+0.70(0.1353)} = \frac{0.30}{0.3947} \approx 0.760. $$

Thus, under this fitted model and these fixed values, the posterior probability that this particular observed zero came from the structural-zero class is about 0.760. This is not a known label: the zero could still have arisen from the Poisson count-generating class, which assigns it probability \(e^{-2}\).

Integrating Over Group Effects

In a mixed model, observations from the same group can inform that group’s random effect. Consequently, the class probability for a particular zero can depend on other observations in its group, even when the structural-zero probability itself has no group-specific random effect. Those observations can alter the distribution of the count mean, and therefore the probability that the count-generating process would produce zero.

The following calculation illustrates this integration using a two-node approximation to the random-effects distribution informed by other observations in a hypothetical group. Suppose the structural-zero probability is constant at \(0.20\). The calculation assigns posterior weight \(0.25\) to a node with count mean \(1\) and weight \(0.75\) to a node with count mean \(3\). These weights are an approximation to uncertainty about the group effect after using the other observations; they are not class labels for the target observation.

Worked Example: Integrating Over Uncertain Group Effects

The target observation is a zero and its count-generating distribution is Poisson. At the two nodes, the zero probabilities are \(e^{-1}\approx0.3679\) and \(e^{-3}\approx0.04979\). The integrated structural-zero contribution is \(0.20\), while the integrated count-generating contribution to a zero is

$$ (1-0.20)\{0.25e^{-1}+0.75e^{-3}\} = 0.80\{0.25(0.3679)+0.75(0.04979)\} \approx 0.1035. $$

Therefore the integrated posterior probability is

$$ \frac{0.20}{0.20+0.1035} \approx 0.659. $$

The fitted model assigns about a 0.659 posterior probability to structural-zero membership for this observed zero, after accounting for the specified uncertainty about the group effect. For comparison, using the node-specific means would give probabilities of about \(0.405\) at mean \(1\) and \(0.834\) at mean \(3\). Neither node-specific result is the integrated probability. Nor is it generally valid to replace the uncertain mean by its weighted average, \(0.25(1)+0.75(3)=2.5\), and calculate as if that mean were known: the zero probability and the posterior ratio are nonlinear functions of the mean.

In practice, the integration may be carried out with numerical integration, quadrature, or simulation, depending on the fitting method. If model parameters are treated as estimated plug-in values, this calculation accounts for random-effects uncertainty only to the extent represented by the fitted procedure. It does not automatically account for uncertainty in the estimated regression coefficients, dispersion parameter, or other model parameters. A fully Bayesian posterior probability would also average over parameter uncertainty.

Probabilities Describe Uncertainty, Not Individual Labels

A posterior class probability is conditional on the fitted model, its covariates, its random-effects distribution, and the observed data used in the calculation. It is therefore a model-based measure of uncertainty, not a direct observation of an individual’s latent state. A probability near one may indicate strong model-based evidence for structural-zero membership, but it remains a probability rather than a verified classification.

Worked Example: Comparing Zeros With Different Count Means

Consider three hypothetical observations, all recorded as zero, in a zero-inflated Poisson model with fixed structural-zero probability \(\pi_i=0.25\). Suppose their count-generating means are \(0.5\), \(2\), and \(4\). For the first zero,

$$ \frac{0.25}{0.25+0.75e^{-0.5}} = \frac{0.25}{0.25+0.75(0.6065)} \approx 0.355. $$

For the second zero, the probability is

$$ \frac{0.25}{0.25+0.75e^{-2}} = \frac{0.25}{0.25+0.75(0.1353)} \approx 0.711. $$

For the third zero, it is

$$ \frac{0.25}{0.25+0.75e^{-4}} = \frac{0.25}{0.25+0.75(0.01832)} \approx 0.948. $$

The structural-zero probability is the same for all three observations, but the posterior probabilities differ because a zero is less likely under a Poisson process with a larger mean. If these are the only three observations considered and the model values are fixed, the sum \(0.355+0.711+0.948=2.014\) is the expected number of these zeros assigned to the structural class under the model. It does not imply that exactly two observations are structural zeros, or identify which two.

Derivation and Interpretation

The basic result follows directly from the two mutually exclusive ways to observe a zero. Given \(b\), the joint probability of structural membership and a zero is

$$ P(Z_i=1,Y_i=0\mid b) = P(Z_i=1\mid b)P(Y_i=0\mid Z_i=1,b) = \pi_i(b)\times 1 = \pi_i(b). $$

The joint probability of count-class membership and a zero is

$$ P(Z_i=0,Y_i=0\mid b) = (1-\pi_i(b))f(0\mid\mu_i(b),\theta). $$

Adding these disjoint contributions gives \(P(Y_i=0\mid b)\). Dividing the first contribution by this total yields the conditional posterior formula. With uncertain \(b\), each joint contribution is averaged over the distribution of \(b\) informed by the relevant data, and their ratio gives the integrated posterior probability. This justifies why the numerator and denominator are integrated separately.

Diagnostics, Alternatives, and Limitations

Posterior probabilities are only as credible as the model that supplies them. A model that poorly represents the count distribution, covariate effects, dependence, or random-effects distribution may give misleading class probabilities even if the calculations are correct. In particular, a count-generating component that underestimates the chance of zero can make zeros appear more likely to be structural. Check model fit using appropriate residual or predictive checks, including whether the fitted model reproduces the observed zero frequency and the distribution of positive counts. Examine whether probabilities change substantially under reasonable alternative specifications.

The latent-class interpretation is also specific to the model. A hurdle model separates the probability of any positive count from the distribution of positive counts; its zero outcome does not represent a competition between a structural-zero class and a count component that can also generate zero. A non-zero-inflated count model has no structural-zero class to which a posterior probability can be assigned. These approaches may answer different scientific questions, so a calculated class probability should not be treated as proof that a distinct structural process exists.

A common mistake is to say, “The fitted structural-zero probability is 0.30, so this observed zero has a 30% chance of being structural,” or to label every zero as structural whenever the posterior probability exceeds 0.5. The first statement confuses the mixture probability \(\pi_i\) with the posterior probability conditional on the observed zero; the second turns a model-based probability into a definite label. The correction is to calculate the posterior probability using the count component’s probability of zero and any relevant random-effects uncertainty, then report it as a probability. If a decision requires binary labels, the threshold and its consequences need separate justification; the threshold does not make the latent class observed.

Finally, plug-in probabilities can understate uncertainty when parameter estimates are imprecise, especially with sparse data or weak information about the mixture components. Report the fitted-model conditions and, when feasible, assess sensitivity to parameter uncertainty and alternative plausible models. A high posterior probability is evidence conditional on those assumptions, not independent validation of them.

Check Your Understanding

Answer each question, then compare with the solutions below.

  1. For a fixed-effects zero-inflated Poisson model with \(\pi=0.40\) and \(\mu=1\), calculate the posterior structural-zero probability for an observed zero.
  2. In a zero-inflated model, what is the posterior structural-zero probability for an observed count of \(3\), assuming the structural class always produces zero?
  3. Why can two observed zeros have different posterior structural-zero probabilities even when their fitted mixture probability \(\pi_i\) is the same?
  4. If the posterior structural-zero probabilities for four observed zeros are \(0.20\), \(0.60\), \(0.80\), and \(0.90\), what is the expected number of structural-class zeros under the fitted model, and what does that number not tell you?

Solutions. (1) Since \(f(0)=e^{-1}\approx0.3679\), the posterior probability is \(0.40/[0.40+0.60(0.3679)]=0.400/0.6207\approx0.644\). (2) It is zero: the structural class cannot produce a positive count. (3) The count-generating zero probability can differ, for example because the count means differ; the posterior uses both that zero probability and \(\pi_i\). (4) The expected number is \(0.20+0.60+0.80+0.90=2.50\). It is an expectation under the model, not a claim that exactly two or three are structural, and it does not identify which observations belong to that class.

Clinical Biostats