Ecological Absence and Observed Counts
For an ecological count, a recorded zero can arise in more than one way. A species may be structurally absent from a site-period, or it may be present in the sense that the count process is possible but yield zero individuals in the sampled area. A zero-inflated negative binomial generalized linear mixed model (ZINB GLMM) represents these as distinct parts of one probability model. This can be useful when ecological knowledge supports a structural-absence mechanism and the available counts also show overdispersion and repeated observations within groups.
The structural-zero component is not proof that any particular zero has a known biological cause. It assigns a probability to a latent class under stated assumptions. As emphasized in the earlier material on excess zeros, the observed proportion of zeros alone cannot establish that a structural-zero process is present.
Conditional on the group random effects, the probability mass function is
The negative binomial probability of zero is included in the first case: even an observation in the count-process class can be zero. The structural-zero probability \(\pi_{ij}\) is therefore not the same as the probability of observing zero.
Component-Specific GLMM Specification
A useful specification gives each component predictors that match its ecological role. For example, habitat suitability may help explain structural absence, while vegetation cover may explain abundance conditional on the count process being active. Sampling effort belongs in the count mean as an offset when expected abundance is proportional to effort. These assignments should be based on the scientific question and sampling design, not selected merely because a variable is available.
One possible model for site-period observations is
where \(E_{ij}>0\) is effort in a defined unit, \(\boldsymbol{z}_{ij}\) and \(\boldsymbol{x}_{ij}\) are the predictor vectors for the structural-zero and count components, and \(\boldsymbol{\gamma}\) and \(\boldsymbol{\beta}\) are their coefficient vectors. The offset \(\log(E_{ij})\) has coefficient fixed at one. The group effects may be specified as \(u_j\sim N(0,\sigma_u^2)\) and \(b_j\sim N(0,\sigma_b^2)\), independent of one another and across groups. Conditional on these effects, observations are assumed independent, given the specified covariates and model parameters.
This example specification includes a site random intercept in each component. That choice is not mandatory: a random effect may be included in one component only if the design and scientific assumptions support it. If both are included, assuming independence is a substantive simplification; a model with correlated effects would make a different assumption. In either case, group effects describe residual between-group heterogeneity after accounting for the fixed predictors. They do not by themselves demonstrate a structural-zero mechanism.
Worked Example: Assigning Ecological Predictors to Components
Suppose a hypothetical survey records beetle counts at forest sites over sampling periods. Each row is one site-period. Researchers record trap-nights \(E_{ij}\), whether the site-period has suitable moist habitat \(H_{ij}\), and understory cover \(C_{ij}\). A zero can represent a site-period where the species is unavailable, or a count-process zero at a site-period where counts are possible. They want to model repeated observations within sites.
A defensible candidate specification, if supported by ecological knowledge, is
Here the habitat indicator enters the structural-zero component because the stated hypothesis concerns availability in unsuitable habitat. Under this coding, \(H_{ij}=1\) means suitable moist habitat; a negative \(\gamma_1\) would imply lower structural-zero odds in suitable habitat. Understory cover enters the count component because the hypothesis concerns abundance conditional on the count process. Trap-nights are an exposure, so their log is an offset rather than an estimated slope.
For example, a hypothetical row with \(H_{ij}=1\), \(C_{ij}=0.4\), and \(E_{ij}=2\) trap-nights has \(\operatorname{logit}(\pi_{ij})=\gamma_0+\gamma_1+u_j\) and \(\log(\mu_{ij})=\log(2)+\beta_0+0.4\beta_1+b_j\). The two components answer different questions. Putting cover in the structural-zero component would instead assert that cover predicts structural unavailability; it should not be done simply because cover predicts the observed count.
A structural-zero interpretation also requires a meaningful sampling unit and time window. If the species could be present but missed because of imperfect detection, that mechanism is not automatically represented by this model. The survey process and ecological definition of availability must make the proposed interpretation plausible.
Likelihood and Fitted Quantities
For specified random effects, the likelihood contribution of an observation is the mixture probability above. Under the independent random-effects specification, the likelihood for all observations is obtained by multiplying the conditional contributions within groups and integrating over the random effects. For example, with both random intercepts, the likelihood has the form
where \(\phi(\cdot;0,\sigma^2)\) is a normal density with mean zero and variance \(\sigma^2\). The integration accounts for unobserved group effects; treating estimated random effects as known constants would not be the same marginal likelihood.
Conditional on the random effects, the expected observed count and the probability of a zero are
The first identity follows by conditioning on the latent class: the structural-zero class has mean zero, and the count-process class has mean \(\mu_{ij}\). These are conditional fitted quantities. Predictions averaged over random effects require integrating over their distributions; plugging in \(b_j=u_j=0\) does not generally equal a population-averaged prediction.
Worked Example: Calculating a Zero Probability and Expected Count
At a hypothetical site-period, suppose fitted conditional values are \(\pi_{ij}=0.30\), \(\mu_{ij}=4.0\) beetles per standardized sampling unit, and \(\theta=2\). The negative binomial count-process probability of zero is
Thus the total probability of observing zero is
The fitted expected observed count is
The probability of zero is about 0.378, not 0.30, because some observations from the count process are also zero. Among observations that are zero, the model-based conditional probability of belonging to the structural-zero class is \(\pi_{ij}/P(Y_{ij}=0)=0.30/0.3778\approx 0.794\). That is a model-based latent-class probability conditional on the fitted parameters and covariates, not direct confirmation of the biological state.
Interpreting Component Coefficients
A coefficient in the structural-zero component changes the log odds of structural absence; exponentiating it gives an odds ratio for structural absence per one-unit predictor increase, with other terms fixed. A coefficient in the count component changes the log conditional mean of the negative binomial process; exponentiating it gives a multiplicative effect on \(\mu_{ij}\), conditional on the count-process class and random effects. Neither coefficient, on its own, is the multiplicative effect on the expected observed count, because that mean also depends on \(\pi_{ij}\).
Worked Example: Interpreting Fitted Habitat and Cover Effects
Suppose a hypothetical fitted model has structural-zero intercept \(\gamma_0=-0.847\) and habitat coefficient \(\gamma_1=-0.693\), where \(H=1\) denotes suitable habitat. It has count intercept \(\beta_0=\log(2)\) and understory-cover coefficient \(\beta_1=\log(1.5)\). Assume the illustrative site effect in the count component is \(b_j=\log(1.2)\), the structural-component effect is \(u_j=0\), and effort is two trap-nights.
For \(H=0\), the structural-zero odds are \(\exp(-0.847)\approx0.429\), corresponding to \(\pi\approx0.300\). For \(H=1\), the odds are multiplied by \(\exp(-0.693)\approx0.500\): the odds are \(0.429(0.500)=0.2145\), giving \(\pi=0.2145/(1+0.2145)\approx0.177\). Suitable habitat is associated with lower fitted structural-zero odds, conditional on the model.
For a site-period with cover \(C=1\), the count-process mean is
This is 7.20 expected beetles for the count process, conditional on the site effect and the observation being in that process. At \(H=1\), the expected observed count is approximately \((1-0.177)(7.20)=5.93\) beetles. At \(H=0\), holding the other terms fixed, it is \((1-0.300)(7.20)=5.04\) beetles. These are conditional predictions, not population averages over site effects. The cover coefficient implies a 1.5-fold conditional count-process mean for a one-unit increase in cover; it does not by itself imply a 1.5-fold expected observed count.
Why the Mixture Changes the Variance
The mixture can be more variable than a negative binomial count process alone. To see this, write \(v=\mu_{ij}+\mu_{ij}^2/\theta\) for the count-process variance and \(q=1-\pi_{ij}\). Conditional on the random effects, the law of total variance gives
where \(S_{ij}\) denotes the latent class, structural zero or count process. The first term averages the within-class variance; the second is the variation between the class means \(0\) and \(\mu_{ij}\). This calculation is conditional on the random effects. Variation in those effects can add further marginal variation.
Diagnostics, Alternatives, and Limitations
Model checking should examine both components and the grouped structure. Compare observed and model-predicted zero frequencies across important covariate ranges and groups, and compare the distribution of positive counts as well as overall counts. Check whether fitted means and dispersion reproduce upper-tail counts. Examine group-level residual patterns and whether the assumed random-effects structure is plausible. Convergence problems, unstable coefficient estimates, very large standard errors, or estimates pushed toward boundary values can indicate that the data do not adequately distinguish components or support the chosen random-effects model.
A ZINB GLMM is not automatically preferable whenever zeros are frequent. An ordinary negative binomial GLMM is a simpler alternative when overdispersion is present but a separate structural-zero process is not scientifically justified. A hurdle model treats zero versus positive as one process and models positive counts with a zero-truncated distribution; it is appropriate when the scientific process has that two-part structure. A zero-inflated model instead allows zeros from both the structural class and the count distribution. These alternatives imply different probability models and interpretations.
The model also has limits. Structural class membership is latent, so fitted probabilities depend on the model specification and cannot be read as verified absence. With sparse data, few groups, or little variation in component-specific predictors, the two components and random-effect variances may be weakly identified. Unmodeled detection failure, changes in availability within the defined sampling window, or an incorrect effort relationship can undermine the ecological interpretation. A good fit to the overall zero count does not resolve those scientific questions.
Check Your Understanding
Work through each question, then compare with the solutions.
- If \(\pi=0.20\), \(\mu=3\), and \(\theta=3\), calculate the probability of zero and the expected observed count.
- A count-component coefficient for a one-unit increase in canopy cover is \(\log(0.8)\). Interpret it precisely.
- Why is the fitted structural-zero probability not generally equal to the probability of observing zero?
- When might a hurdle model be more suitable than a zero-inflated model?
Solutions. (1) The negative binomial zero probability is \((3/(3+3))^3=0.125\). Thus \(P(Y=0)=0.20+0.80(0.125)=0.300\), and \(E(Y)=0.80(3)=2.40\) expected counts, conditional on random effects. (2) Holding other terms fixed, a one-unit increase in canopy cover multiplies the conditional count-process mean by \(\exp\{\log(0.8)\}=0.8\), a 20% decrease; it does not directly describe structural-zero odds or the observed mean. (3) Count-process observations can also be zero, so the total zero probability includes both the structural-zero probability and the negative binomial zero probability. (4) A hurdle model is a candidate when zero versus positive occurrence is governed by one process and positive counts follow a separate, zero-truncated count distribution.