From Component Predictors to Count Predictions
A fitted model may provide separate predictors for a zero process and a count process. Neither predictor alone is generally the probability of an observed zero or the expected observed count. To make a prediction, first transform each predictor to its component-scale quantity, then combine the components according to the model’s probability structure.
This tutorial focuses on predictions for a particular covariate pattern and, when random effects are present, a specified value of the latent effects. Such predictions are conditional on those effects. A prediction averaged over a random-effects distribution requires integration; it is not generally obtained by setting the random effects to zero and calling that a population average.
For example, a logistic predictor for the zero-inflation component has the form \(\zeta_i\), with \(\pi_i=\operatorname{logit}^{-1}(\zeta_i)=\exp(\zeta_i)/[1+\exp(\zeta_i)]\). In a hurdle model, the corresponding binary predictor is transformed to \(q_i=\operatorname{logit}^{-1}(\xi_i)\). The count predictor may use a log link, \(\log(\mu_i)=\eta_i\), so \(\mu_i=\exp(\eta_i)\). If the count predictor includes an exposure offset, that offset is already part of \(\eta_i\); use the resulting \(\mu_i\) in the formulas below.
Predictions From a Zero-Inflated Model
A zero-inflated model says that an observation is generated either from an additional-zero state, with probability \(\pi_i\), or from the baseline count distribution, with probability \(1-\pi_i\). The baseline distribution itself may also generate zero. Thus, an observed zero can arise by two routes.
The mean follows because the additional-zero state contributes zero, while the baseline state contributes its mean. In particular, \(\mu_i\) is not the overall mean of the zero-inflated response unless \(\pi_i=0\). The formula also shows why simply reporting \(\pi_i\) as the predicted zero probability is incorrect: it omits zeros generated by the baseline count distribution.
Worked Example: Zero-Inflated Poisson Predictions
Suppose the fitted zero-inflation predictor is \(\zeta_i=-1\) and the fitted Poisson log-mean predictor is \(\eta_i=0.7\). Calculate the probability of zero, the probability of exactly two counts, and the overall expected count for this covariate pattern.
First transform both predictors: $$ \pi_i=\frac{\exp(-1)}{1+\exp(-1)}\approx0.268941,\qquad \mu_i=\exp(0.7)\approx2.013753. $$ For a Poisson baseline, \(f_i(0)=\exp(-\mu_i)\approx0.133487\), and $$ f_i(2)=\exp(-\mu_i)\frac{\mu_i^2}{2!}\approx0.270658. $$
The observed-zero probability includes both routes to zero: $$ P(Y_i=0)=0.268941+(1-0.268941)(0.133487)\approx0.366528. $$
Exactly two counts can only come from the baseline component, so $$ P(Y_i=2)=(1-0.268941)(0.270658)\approx0.197867. $$ Finally, the overall expected count is $$ E(Y_i)=(1-0.268941)(2.013753)\approx1.47217. $$ Thus the predicted zero probability is about 0.367, the probability of exactly two counts is about 0.198, and the expected count is about 1.47 counts per observation at this covariate pattern. The count-component mean, about 2.01, is larger because it excludes the additional-zero component.
The same combination applies when the baseline distribution is negative binomial rather than Poisson. The negative-binomial probability mass function supplies \(f_i(0)\), \(f_i(y)\), and \(\mu_i\); the zero-inflation formulas themselves do not change. This distinction is useful: the baseline distribution controls the shape and dispersion of counts in its component, while \(\pi_i\) controls the additional-zero mixture probability.
Worked Example: A Zero-Inflated Negative-Binomial Prediction
Consider a negative-binomial baseline with size \(r=2\) and mean \(\mu_i=3\). Use the parameterization in which the baseline zero probability is \([r/(r+\mu_i)]^r\). Suppose the fitted zero-inflation predictor gives \(\pi_i=0.2\), corresponding to \(\zeta_i=\log(0.2/0.8)\approx-1.3863\). Calculate the overall zero probability, the probability of exactly one count, and the overall mean.
The baseline zero probability is $$ f_i(0)=\left(\frac{2}{2+3}\right)^2=0.16. $$ For this parameterization, the baseline probability of one count is $$ f_i(1)=2\left(\frac{2}{5}\right)^2\left(\frac{3}{5}\right)=0.192. $$ Therefore, $$ P(Y_i=0)=0.2+(1-0.2)(0.16)=0.328, \qquad P(Y_i=1)=(1-0.2)(0.192)=0.1536. $$ The overall mean is $$ E(Y_i)=(1-0.2)(3)=2.4. $$ These are predictions for the response, not just for the negative-binomial component: the extra-zero mixture reduces the baseline mean from 3 to 2.4 and raises the zero probability from 0.16 to 0.328.
Predictions From a Hurdle Model
A hurdle model separates the chance of any positive count from the distribution of counts after the hurdle is crossed. Let \(q_i=P(Y_i>0)\). Conditional on being positive, the count follows the baseline distribution truncated to exclude zero. The positive-count distribution must therefore be renormalized: its baseline probabilities are divided by \(1-f_i(0)\).
The denominator is essential. The probabilities \(f_i(y)\) for \(y>0\) sum to \(1-f_i(0)\), not 1. Dividing by that quantity makes the positive-count probabilities conditional on being positive and ensures that their sum is 1. The conditional positive-count mean is \(\mu_i/[1-f_i(0)]\), so the overall mean is this conditional mean multiplied by the probability \(q_i\) of a positive count.
Worked Example: Hurdle Poisson Predictions
Suppose a hurdle model has a fitted crossing probability \(q_i=0.8\) and a Poisson count component with mean \(\mu_i=1.5\). Calculate the probabilities of zero, one, and two counts, and the overall expected count.
The baseline zero probability is \(f_i(0)=\exp(-1.5)\approx0.223130\), so \(1-f_i(0)\approx0.776870\). The hurdle model gives $$ P(Y_i=0)=1-0.8=0.2. $$ For one count, the baseline probability is \(f_i(1)=1.5\exp(-1.5)\approx0.334695\). Hence $$ P(Y_i=1)=0.8\frac{0.334695}{0.776870}\approx0.344660. $$ For two counts, \(f_i(2)=1.5^2\exp(-1.5)/2\approx0.251021\), giving $$ P(Y_i=2)=0.8\frac{0.251021}{0.776870}\approx0.258495. $$ The expected count is $$ E(Y_i)=0.8\frac{1.5}{0.776870}\approx1.54466. $$ The positive probabilities are conditional baseline probabilities rescaled by \(q_i\); they are not simply \(0.8f_i(y)\). The expected count exceeds \(q_i\mu_i=1.2\), because conditioning the baseline Poisson distribution to be positive raises its mean from 1.5 to about 1.931.
Why the Hurdle Normalization Works
The positive-count probabilities must sum to the probability of crossing the hurdle. This gives a direct check on the formula:
Adding \(P(Y_i=0)=1-q_i\) gives total probability 1. For the mean, sum the positive values weighted by their probabilities:
The last equality holds because the zero term contributes \(0\) to the baseline mean, so \(\sum_{y=1}^{\infty}yf_i(y)=\mu_i\). These results require a proper baseline count distribution with \(f_i(0)<1\), and a valid component probability \(0\le q_i\le1\). A degenerate baseline with all its mass at zero cannot be truncated to define a positive-count distribution.
Practical Checks and Common Prediction Errors
Before interpreting fitted predictions, check the model specification and the scale on which each quantity is defined. In particular, a log-linked count predictor yields a baseline mean after exponentiation; a logistic component predictor yields a probability after the inverse-logit transformation. If an exposure offset is part of the fitted count predictor, use the offset-adjusted mean for the exposure represented by the prediction. Do not add the offset a second time.
- Check probability sums. For a zero-inflated model, \(P(Y_i=0)+\sum_{y=1}^{\infty}P(Y_i=y)=1\). For a hurdle model, the positive probabilities must sum to \(q_i\), and adding \(1-q_i\) must give 1.
- Check the mean against the component meaning. In a zero-inflated model, the overall mean cannot exceed \(\mu_i\) when \(\mu_i\ge0\). In a hurdle model, the overall mean is \(q_i\) times the conditional positive mean, not \(q_i\mu_i\) in general.
- Check whether predictions are conditional or averaged. With random effects, formulas applied at a specified latent-effect value produce conditional predictions. A population-averaged zero probability or mean generally requires averaging the relevant conditional quantity over the random-effects distribution.
- Compare fitted and observed patterns at relevant covariate values. Large discrepancies in zero frequencies, positive-count frequencies, or average counts can indicate a poor component specification or a mismatch between the prediction target and the conditioning used in fitting.
A frequent mistake is to treat the fitted zero-inflation probability \(\pi_i\) as \(P(Y_i=0)\), or to treat the hurdle crossing probability \(q_i\) as the mean count. Both errors confuse a component quantity with a response-level prediction. In a zero-inflated model, add the baseline distribution’s zero probability through the mixture formula. In a hurdle model, \(q_i\) is the probability of a positive count; the positive distribution’s truncated mean determines how large those counts are on average.
These formulas apply to model-based point predictions, conditional on fitted parameters and specified predictors or latent effects. They do not by themselves quantify uncertainty in estimated parameters or random effects. Also, a fitted component probability is a model-based probability for an observation with given predictors; it should not be read as a definitive classification of that observation into a latent state.
| Prediction target | Zero-inflated model | Hurdle model |
|---|---|---|
| Probability of zero | \(\pi_i+(1-\pi_i)f_i(0)\) | \(1-q_i\) |
| Probability of a positive value \(y\) | \((1-\pi_i)f_i(y)\) | \(q_i f_i(y)/[1-f_i(0)]\) |
| Overall expected count | \((1-\pi_i)\mu_i\) | \(q_i\mu_i/[1-f_i(0)]\) |
| Meaning of binary component | Probability of the additional-zero state | Probability of crossing to a positive count |
The main alternative to a mixture calculation is to report only the count-component prediction. That may be appropriate when the scientific target is specifically the count distribution among observations in that component, but it is not the expected observed count across all observations. The correct choice depends on the prediction target: state whether the result concerns the whole response distribution, the positive-count subset, or a component of the model.
Check Your Understanding
Work each prediction from the component quantities, then compare with the solutions.
- A zero-inflated Poisson model has \(\pi_i=0.25\) and \(\mu_i=1\). Find \(P(Y_i=0)\) and \(E(Y_i)\).
- A hurdle Poisson model has \(q_i=0.6\) and \(\mu_i=2\). Find \(P(Y_i=0)\) and \(E(Y_i)\).
- Explain why the positive-count probabilities in a hurdle model cannot generally be calculated as \(q_i f_i(y)\).
- A negative-binomial baseline has \(r=2\), \(\mu_i=3\), and \(f_i(0)=0.16\). A hurdle model has \(q_i=0.7\), and the baseline probability of one count is \(f_i(1)=0.192\). Find \(P(Y_i=1)\) and the overall expected count.
- With random effects in a component predictor, what does a prediction calculated at random effect zero represent, and why is it not necessarily population averaged?
Solutions. (1) The Poisson baseline zero probability is \(\exp(-1)\approx0.367879\). Thus \(P(Y_i=0)=0.25+0.75(0.367879)\approx0.525910\), and \(E(Y_i)=0.75(1)=0.75\) count. (2) \(P(Y_i=0)=1-0.6=0.4\). Since \(1-\exp(-2)\approx0.864665\), \(E(Y_i)=0.6(2)/[1-\exp(-2)]\approx1.38782\) counts. (3) The positive baseline probabilities sum to \(1-f_i(0)\), not 1. The correct hurdle probability is \(q_i f_i(y)/[1-f_i(0)]\), which makes the positive probabilities sum to \(q_i\). (4) \(P(Y_i=1)=0.7(0.192)/(1-0.16)=0.16\). The mean is \(0.7(3)/0.84=2.5\) counts. (5) It is a prediction conditional on the latent effects being zero. Because inverse links and mixture formulas are nonlinear, evaluating at zero generally does not equal averaging the conditional predictions over the random-effects distribution.