Tutorials › Generalized Linear Mixed Models (GLMM) › Zeros at the Observation and Group Levels

Overdispersion and Zero Inflation · Tutorial 565 of 698

Zeros at the Observation and Group Levels

Learn how to represent structural zeros at the observation or group level, and why a shared group-level mechanism changes the joint distribution of counts.

Advanced 12 min read

What You'll Learn

  • Define observation-level structural-zero and group-level persistent-zero mechanisms.
  • Write the likelihood for a group that may belong to an all-zero latent class.
  • Distinguish a shared zero propensity from a shared all-zero state.
  • Calculate how group-level zero mechanisms change joint zero probabilities.
  • Identify assumptions and practical warning signs for these models.
  • Compare group-level zero mechanisms with observation-level mixtures and count heterogeneity.

Why the Level of a Zero Mechanism Matters

A zero-inflated count model can assign a structural-zero mechanism to each observation. When observations are grouped, however, another possibility is that the group has a persistent zero state: every observation in that group is zero because the group is structurally unable to produce events. These mechanisms can give the same probability of zero for an individual observation but very different probabilities for an entire group to be all zero.

The distinction is about the level at which the latent mechanism operates, not simply about how many zeros appear in the data. For example, a set of sites might each have a chance of being unavailable on a particular occasion, or a site might be persistently unavailable across all occasions. Those statements imply different probability models and different dependence among observations from the same group.

Definition: Let \(Y_{ig}\) be a count for observation \(i\) in group \(g\), with base count probability mass function \(f(y;\mu_{ig},\theta)\). An observation-level structural zero is generated by a latent indicator specific to \(i,g\); a group-level persistent structural zero is generated by a latent state shared by all observations in group \(g\). In either case, a structural zero is exactly zero by the model, whereas a count generated by the base distribution can also happen to equal zero.

Three Related but Distinct Models

First consider observation-level zero inflation. Let \(Z_{ig}=1\) indicate that observation \(i\) in group \(g\) is in the structural-zero state, with \(P(Z_{ig}=1)=\pi_{ig}\). If \(Z_{ig}=1\), then \(Y_{ig}=0\); otherwise \(Y_{ig}\) is drawn from the base count distribution. Thus

$$ P(Y_{ig}=0)=\pi_{ig}+(1-\pi_{ig})f(0;\mu_{ig},\theta), \qquad P(Y_{ig}=y>0)=(1-\pi_{ig})f(y;\mu_{ig},\theta). $$

If the structural indicators are independent across observations conditional on their probabilities and the base counts are conditionally independent, this model does not add a shared zero state to the group. Each observation can be structurally zero independently.

For a persistent group-level state, let \(S_g=1\) mean the whole group is structurally zero, with \(P(S_g=1)=\rho_g\). If \(S_g=1\), then \(Y_{ig}=0\) for every \(i\) in group \(g\). If \(S_g=0\), the observations are generated from their base count distributions. Assuming conditional independence in the nonstructural state, the group likelihood contribution is

$$ P(\mathbf{Y}_g=\mathbf{y}_g) = \rho_g\,\mathbf{1}\{y_{ig}=0\text{ for all }i\} + (1-\rho_g)\prod_i f(y_{ig};\mu_{ig},\theta). $$

Here \(\mathbf{1}\{\cdot\}\) equals one when the condition inside the braces holds and zero otherwise. A group with any positive count cannot be in the persistent structural-zero state. An all-zero group can arise either from that state or by chance from the base count distribution.

A third model gives a group its own zero propensity without declaring that the whole group is necessarily in an all-zero state. For example, let

$$ \operatorname{logit}(\pi_g)=\gamma_0+u_g,\qquad u_g\sim N(0,\sigma_u^2), $$

and use \(\pi_g\) as the structural-zero probability for each observation in group \(g\). Conditional on \(\pi_g\), observation-level structural indicators may be independent. The shared propensity makes zeros more common in some groups than others, but a group with high \(\pi_g\) can still have positive counts. This is not the same as a shared persistent state \(S_g\), which makes every count in a structural group exactly zero.

What Shared Group States Imply

A group-level state changes the joint distribution, not only the marginal probability of zero. Suppose, for simplicity, that every observation in a group has the same base probability \(f_0=P(Y_{ig}=0\mid S_g=0)\). Write \(A_{ig}=1\{Y_{ig}=0\}\). Under the persistent-zero model, \(P(A_{ig}=1)=\rho_g+(1-\rho_g)f_0\). For two distinct observations in the same group, conditional independence given \(S_g\) gives

$$ \operatorname{Cov}(A_{ig},A_{jg}) = \rho_g(1-\rho_g)(1-f_0)^2,\qquad i\ne j. $$

To see this, conditional on \(S_g=1\), both zero indicators equal one. Conditional on \(S_g=0\), each has mean \(f_0\) and the indicators are independent. Therefore \(E(A_{ig}A_{jg})=\rho_g+(1-\rho_g)f_0^2\). Subtracting \(\{\,\rho_g+(1-\rho_g)f_0\,\}^2\) gives the displayed covariance. It is positive when \(0<\rho_g<1\) and \(f_0<1\). Thus an excess of all-zero groups can be a signature of shared latent states, although it does not by itself establish that this mechanism is appropriate.

The model requires substantive and statistical assumptions. The structural group state must make all counts in that group zero; groups must be independent of one another conditional on modeled covariates and any specified shared effects; and, within a nonstructural group, the base count model must describe the counts and their conditional dependence. If a group has varying exposures or covariates, its base probabilities \(f(0;\mu_{ig},\theta)\) need not be equal. The group likelihood still uses their product, but the simplified covariance expression above no longer applies unchanged.

Worked Example: Same Marginal Zeros, Different All-Zero Probability

Suppose each group contains three observations. For every observation, the nonstructural count follows a Poisson distribution with mean \(1.5\), and the structural probability is \(0.20\). Compare independent observation-level structural zeros with a group-level persistent-zero state whose probability is \(0.20\).

The Poisson base probability of zero is \(f_0=e^{-1.5}=0.2231\). Under either model, the marginal zero probability for one observation is \(0.20+0.80(0.2231)=0.3785\).

Under independent observation-level mixtures, the probability that all three observations are zero is \((0.3785)^3=0.0542\), approximately. Under a persistent group state, the probability is \(0.20+0.80(0.2231)^3=0.2089\).

The marginal probability for one observation matches, but the all-zero group probability does not. The group-level model assigns probability \(0.20\) to the shared structural state itself, which guarantees a fully zero group. These calculations assume the stated Poisson distribution and conditional independence in the nonstructural state.

Worked Example: Likelihood of a Group with a Positive Count

A hypothetical group has observed counts \((0,0,2)\). Suppose its nonstructural counts are conditionally independent Poisson variables with mean \(1\), and its persistent structural-zero probability is \(\rho_g=0.15\). Find the group likelihood contribution under the persistent-zero model.

Because the group contains a positive count, it cannot be in the state that forces every count to zero. The indicator term in the group likelihood is therefore zero. The contribution is \((1-0.15)P_{\text{Pois}(1)}(0)P_{\text{Pois}(1)}(0)P_{\text{Pois}(1)}(2)\). Using \(P_{\text{Pois}(1)}(0)=e^{-1}\) and \(P_{\text{Pois}(1)}(2)=e^{-1}/2\),

$$ 0.85(e^{-1})(e^{-1})(e^{-1}/2) =0.85\,e^{-3}/2 =0.02116. $$

This is a likelihood contribution, not a probability that the observed group belongs to the nonstructural state. The positive count rules out the persistent structural-zero state for this observed group under the model, but it does not show that the model’s assumptions are correct.

Group-Specific Zero Propensities Are Not All-Zero States

In a group-specific propensity model, each observation retains its own structural-zero indicator. The group shares a probability \(\pi_g\), not necessarily a single state that forces all its counts to zero. For example, set \(\operatorname{logit}(\pi_g)=\gamma_0+u_g\), where \(u_g\) is a group random effect. Conditional on \(u_g\), a count has zero probability \(\pi_g+(1-\pi_g)f(0;\mu_{ig},\theta)\). The random effect allows groups to differ in their tendency to produce structural zeros. When \(u_g\) is integrated out, observations in a group can be dependent marginally, because they share the same uncertain propensity.

Worked Example: A Shared Propensity Does Not Force Every Count to Zero

Suppose a hypothetical group has two observations with Poisson base means \(1\), and its shared observation-level structural-zero propensity is \(\pi_g=0.40\). Conditional on this known propensity, assume the observations are independent. The probability that one count is zero is \(0.40+0.60e^{-1}=0.6207\).

The probability both counts are zero is therefore \((0.6207)^2=0.3853\). In contrast, if \(0.40\) were the probability of a persistent group-level structural-zero state, the probability both counts were zero would be \(0.40+0.60(e^{-1})^2=0.4812\).

In the shared-propensity model, some groups will have a zero and a positive count even when their propensity is elevated. In the persistent-state model, the structural component contributes only all-zero groups. This comparison conditions on \(\pi_g=0.40\); if \(\pi_g\) is random, its distribution must also be included in the marginal calculation.

Model Choice, Diagnostics, and Limits

A practical formulation begins by asking what is shared. If each observation can independently be unavailable or not at risk, an observation-level mixture may be appropriate. If a group can be persistently incapable of producing counts throughout the observation period, a group-level structural state represents that claim. If groups differ in their rates of observation-level structural zeros but can still contain positive counts, a group-specific propensity is more apt. These are alternative scientific descriptions, not merely different computational options.

The base distribution matters as well. A Poisson base model may be inadequate when counts remain overdispersed after accounting for covariates and group structure; a negative binomial base distribution is one alternative. Ordinary random effects in the count mean can also create group heterogeneity and many zeros without any structural-zero state. Hurdle models, by contrast, specify a zero-versus-positive process and a positive-count distribution. Their interpretation differs from a mixture in which zeros can arise from both the structural component and the base count distribution.

Useful checks include comparing observed and model-predicted numbers of all-zero groups, groups with at least one positive count, and within-group zero patterns. Also examine whether predicted counts and zero frequencies vary appropriately with exposure and covariates. A model that predicts the overall zero fraction well but misses the frequency of all-zero groups may have the wrong dependence structure. Conversely, a large observed number of all-zero groups is not proof of a persistent structural state: omitted group heterogeneity, an inadequate base distribution, or errors in exposure and group definitions may produce similar patterns.

These models have limits. A group-level structural state can be difficult to distinguish from a group with a very small but nonzero count rate, particularly when groups have few observations. Estimating group-specific propensities can also be unstable when there are few groups or sparse counts. The latent states are not directly observed; their interpretation depends on model assumptions and cannot be read off from an observed zero. A model should therefore be justified by the sampling process and checked against patterns beyond the overall proportion of zeros.

Common pitfall: “Each observation has a 20% chance of a structural zero, so the probability that a group is all structural zeros is 20%.” This confuses a per-observation probability with a shared group state. With three independent observation-level indicators, the probability all three are structural is \(0.20^3=0.008\). A persistent group-level state with probability \(0.20\), by contrast, makes all three structural together with probability \(0.20\). The correct calculation depends on which latent variable the model specifies.

Check Your Understanding

Answer each question using the stated model assumptions. Short solutions follow each question.

  1. A group has two observations, each with base zero probability \(0.30\), and a persistent structural-zero probability of \(0.10\). What is the probability both observed counts are zero?

    Solution: The group is structurally zero with probability \(0.10\). Otherwise, both base counts are zero with probability \(0.30^2=0.09\). Thus \(P(\text{both zero})=0.10+0.90(0.09)=0.181\).

  2. Under independent observation-level mixtures, each observation has structural-zero probability \(0.10\) and base zero probability \(0.30\). What is the probability both observations are zero?

    Solution: The marginal zero probability for one observation is \(0.10+0.90(0.30)=0.37\). Independence gives \(0.37^2=0.1369\), or \(0.1369\) to four significant figures.

  3. A group governed by a persistent all-zero state has counts \((0,1,0)\). Can its persistent structural-zero state have generated these data?

    Solution: No. That state forces every count in the group to be zero, and the observed count \(1\) contradicts it. Under the specified mixture, this group’s likelihood contribution comes only from the nonstructural component.

  4. In one sentence, distinguish a shared group-specific zero propensity from a persistent group-level structural-zero state.

    Solution: A shared propensity gives each observation in a group a common chance of being structurally zero, whereas a persistent state makes every count in the group zero whenever that shared state occurs.

Clinical Biostats