Tutorials › Generalized Linear Mixed Models (GLMM) › Covariates in Both Hurdle Components

Overdispersion and Zero Inflation · Tutorial 561 of 698

Covariates in Both Hurdle Components

Specify and assess distinct covariate effects in the two parts of a negative binomial hurdle model.

Advanced 12 min read

What You'll Learn

  • Write separate linear predictors for the hurdle probability and the positive-count distribution.
  • Specify a zero-truncated negative binomial model for positive counts.
  • Distinguish covariates that affect occurrence from those that affect positive-count magnitude.
  • Understand how group-level random effects enter each component of a hurdle GLMM.
  • Check model fit, identifiability, and convergence separately across components.
  • Compare component-specific covariate models with shared-effect restrictions.

Two Distinct Questions in a Hurdle Model

A count outcome can reflect two different processes: whether any events occur, and how many occur once the count is positive. A covariate may be associated with one process, both, or neither. A hurdle model represents these processes with separate components, so including a covariate in both components does not mean that its effect is assumed to be the same twice.

For example, a hypothetical intervention might be associated with the chance of recording any event, while baseline severity might be associated with the number of events among people with at least one. Separate predictors allow the data and scientific question to distinguish those roles. The associations remain conditional statistical relationships; they do not by themselves establish causal effects.

Definition: Let \(Y_{ij}\) be a nonnegative count for observation \(i\) in group \(j\), and define \(A_{ij}=I(Y_{ij}>0)\). A hurdle model specifies \(q_{ij}=P(Y_{ij}>0\mid\text{covariates})\) and, separately, a count distribution conditional on \(Y_{ij}>0\). Every zero comes from the first component; positive counts follow a zero-truncated distribution in the second.

Separate Predictors in a Negative Binomial Hurdle GLMM

For a negative binomial parent distribution, use the NB2 parameterization with mean \(\mu_{ij}\) and shape parameter \(\kappa>0\). Its probability mass function is \(f_{\mathrm{NB}}(y;\mu,\kappa)\), with mean \(\mu\) and variance \(\mu+\mu^2/\kappa\). The zero-truncated distribution assigns, for \(y=1,2,\ldots\), probability \(f_{\mathrm{NB}}(y;\mu,\kappa)/[1-f_{\mathrm{NB}}(0;\mu,\kappa)]\).

$$ f_{\mathrm{NB}}(y;\mu,\kappa) = \frac{\Gamma(y+\kappa)}{\Gamma(\kappa)y!} \left(\frac{\kappa}{\kappa+\mu}\right)^{\kappa} \left(\frac{\mu}{\kappa+\mu}\right)^y, \qquad f_{\mathrm{NB}}(0;\mu,\kappa) = \left(\frac{\kappa}{\kappa+\mu}\right)^{\kappa}. $$

A common specification gives the hurdle probability a logit link and the parent negative binomial mean a log link. Let \(x_{ij}\) and \(w_{ij}\) denote covariate vectors for the two parts; they need not contain the same variables. For a GLMM, group-level random effects can be included in either or both linear predictors.

$$ \operatorname{logit}(q_{ij}) = \log\left(\frac{q_{ij}}{1-q_{ij}}\right) = x_{ij}^{T}\beta^{(0)}+z_{ij}^{(0)T}b_j^{(0)}, \qquad \log(\mu_{ij}) = w_{ij}^{T}\beta^{(+)}+z_{ij}^{(+)T}b_j^{(+)}. $$

Here \(\beta^{(0)}\) and \(\beta^{(+)}\) are distinct fixed-effect coefficient vectors. The superscripts label the zero/positive hurdle component and the positive-count component. The random effects may be absent, separately distributed, or jointly modeled; if jointly modeled, their dependence should be specified rather than silently assumed to be zero. Conditional on the random effects and covariates, observations are typically assumed independent, and the positive count follows the specified truncated distribution. When random effects are present, the marginal likelihood integrates over their distribution.

The negative binomial mean \(\mu_{ij}\) is the mean of the untruncated parent distribution, not the mean among positive observations. For the latter, conditioning removes the zero mass:

$$ E(Y_{ij}\mid Y_{ij}>0,\text{covariates},b_j) = \frac{\mu_{ij}}{1-f_{\mathrm{NB}}(0;\mu_{ij},\kappa)}. $$

Consequently, a predictor in the positive-count component changes the parent mean and, through the truncation factor, the conditional positive-count distribution. It is not generally correct to interpret its coefficient as a direct log change in the conditional mean among positive observations.

Worked Example: A Predictor in Both Components

Consider hypothetical counts with a binary covariate \(x\), where \(x=1\) marks one group and \(x=0\) the reference group. Suppose the fitted hurdle and parent-mean models are \(\operatorname{logit}(q)=-0.4+0.7x\) and \(\log(\mu)=\log(2)+0.5x\), with \(\kappa=2\). Calculate the two component quantities for each group.

For \(x=0\), the positive-count probability is \(q=\exp(-0.4)/[1+\exp(-0.4)]=0.4013\). The parent mean is \(\mu=2\), and the negative binomial zero probability is \(f_{\mathrm{NB}}(0)=[2/(2+2)]^2=0.25\). Thus the mean among positive counts is \(2/(1-0.25)=2.667\) counts.

For \(x=1\), the hurdle probability is \(q=\exp(0.3)/[1+\exp(0.3)]=0.5744\). The parent mean is \(\mu=2\exp(0.5)=3.297\). Its zero probability is \([2/(2+3.297)]^2\approx0.1425\), so the mean among positive counts is \(3.297/(1-0.1425)\approx3.846\) counts.

In this hypothetical model, the covariate is associated with both a higher probability of a positive count and a larger conditional positive-count mean. These are two distinct comparisons. The arithmetic for the latter uses the untruncated negative binomial zero probability, not the hurdle probability.

Likelihood: Why the Two Components Have Separate Roles

Conditional on covariates and random effects, an observation contributes \(1-q_{ij}\) to the likelihood if its count is zero. If its count is positive, it contributes \(q_{ij}\) multiplied by the zero-truncated count probability. This follows directly from the two-stage probability rule: first cross the hurdle, then draw a positive count from the truncated distribution.

$$ P(Y_{ij}=y\mid\cdot) = \begin{cases} 1-q_{ij}, & y=0,\\[4pt] q_{ij}\, \dfrac{f_{\mathrm{NB}}(y;\mu_{ij},\kappa)} {1-f_{\mathrm{NB}}(0;\mu_{ij},\kappa)}, & y>0. \end{cases} $$

Writing \(I_{ij}^{+}=I(Y_{ij}>0)\), the conditional log likelihood for independent observations is therefore

$$ \ell = \sum_{ij} \left[ (1-I_{ij}^{+})\log(1-q_{ij}) + I_{ij}^{+} \left\{ \log(q_{ij}) +\log f_{\mathrm{NB}}(Y_{ij};\mu_{ij},\kappa) -\log\!\left[1-f_{\mathrm{NB}}(0;\mu_{ij},\kappa)\right] \right\} \right]. $$

This expression shows why the predictors may differ: the hurdle terms involve \(q_{ij}\), while the truncated-count terms involve \(\mu_{ij}\) and \(\kappa\). With no shared parameters and no dependent random effects, the likelihood separates into a binary hurdle contribution and a positive-count contribution. Shared random effects or other shared parameters can couple estimation after integration, even though the conditional probability still has the two stated components.

Model conditions: The response must be a nonnegative count with zeros and positive values defined consistently. The hurdle probability must lie strictly between zero and one, and the parent count distribution must assign positive probability to positive counts. The chosen links, negative binomial form, covariate structure, and random-effects distribution must be adequate for the data. For a GLMM, inference also depends on the assumed random-effects distribution and the conditional-independence structure.

Choosing Which Covariates Enter Each Part

Start from the distinct scientific outcomes represented by the model. Include a predictor in the hurdle equation when it is relevant to the probability of any positive count. Include it in the positive-count equation when it is relevant to the count distribution among observations above zero. A predictor can be included in either equation, both, or neither. Component-specific coefficients should be estimated separately unless a substantive argument justifies a restriction.

Using the same covariate in both parts is not the same as using one common coefficient: the hurdle coefficient acts on log odds, while the positive-count coefficient acts on the log parent mean. Likewise, using different covariate sets is a modeling choice, not a claim that the two processes are unrelated in every respect. If group-level variation is plausible, random effects may also be needed in one or both equations. The need for each component should be assessed using the design, scientific context, and diagnostics rather than selected only because a coefficient happens to be significant.

Worked Example: Different Predictors for Occurrence and Magnitude

Suppose a hypothetical study records a count for each person, a treatment indicator \(T\), and baseline severity \(S\). A plausible prespecified model is \(\operatorname{logit}(q)=-1+0.8T-0.5S\) and \(\log(\mu)=\log(1.5)+0.6S\), with \(\kappa=3\). Treatment appears only in the hurdle component; severity appears in both. For a treated person with severity \(S=2\), calculate the fitted component quantities.

The hurdle linear predictor is \(-1+0.8(1)-0.5(2)=-1.2\), giving \(q=\exp(-1.2)/[1+\exp(-1.2)]=0.2315\). The parent mean is \(1.5\exp[0.6(2)]=1.5\exp(1.2)=4.980\) counts.

The parent zero probability is \([3/(3+4.980)]^3\approx0.0531\), so the positive-count conditional mean is \(4.980/(1-0.0531)=5.260\) counts. For an otherwise comparable untreated person, the hurdle predictor is \(-2\), giving \(q=0.1192\), while the parent mean and truncated positive-count distribution are unchanged by this model because \(T\) is absent from the count equation.

The conclusion is model-specific: treatment is allowed to distinguish the odds of crossing the hurdle, while severity is allowed to relate to both components. This specification does not establish that treatment causes any change.

Model Comparison, Diagnostics, and Limitations

A useful comparison is between a component-specific model and a restricted model that removes a predictor from one component. For nested models fitted to the same observations under the same likelihood assumptions, a likelihood-ratio statistic is twice the difference in maximized log likelihoods. Its usual chi-square reference distribution is an approximation requiring regularity conditions; boundary parameters, sparse outcomes, or weak identification can make that approximation unreliable.

Worked Example: Testing a Covariate in the Positive-Count Component

Suppose a hypothetical analysis compares a model with severity in both components against a nested model that retains severity in the hurdle equation but removes it from the positive-count equation. Assume the fitted log likelihoods are \(-121.8\) and \(-124.6\), respectively, and the difference is one estimated slope. Calculate the likelihood-ratio statistic and interpret it at \(\alpha=0.05\).

The statistic is \(2[-121.8-(-124.6)]=2(2.8)=5.6\), with \(df=1\). Under the regular chi-square approximation, the p-value is approximately \(0.0180\). Since \(0.0180<0.05\), this comparison provides evidence against the restriction that the severity slope in the positive-count component is zero, conditional on the model assumptions. It is not the probability that the restriction is true, and it does not establish a causal effect.

Inspect each component rather than relying on a single overall fit summary. In the hurdle component, compare observed and fitted positive-count proportions across covariate patterns and groups; look for sparse patterns or near-complete separation, which can produce unstable logistic estimates. In the positive-count component, examine whether the truncated negative binomial captures the distribution of positive counts, including its upper tail. Check convergence warnings, large standard errors, sensitivity to starting values, and whether random-effect estimates are stable. A model can fit one component reasonably while failing in the other.

A hurdle model differs from a zero-inflated model: the hurdle construction assigns every zero to the binary component, whereas a zero-inflated model permits zeros from both a count process and a separate zero-generating process. A hurdle model can also be compared with a restriction that forces the same covariate set, or selected slopes, across its components. Such restrictions can simplify estimation but should be justified; the two links and outcomes differ, so a shared covariate effect is not automatically a shared parameter.

Common pitfall: A positive-count coefficient is sometimes described as changing the probability of any count, or as a direct multiplicative change in the mean among positive observations. Both claims confuse components. The hurdle equation determines \(P(Y>0)\); the count equation determines the zero-truncated positive-count distribution through its parent mean and dispersion.

The separate-component structure does not guarantee that the chosen covariates or distributions are correct. Small samples may provide little information about the positive-count tail, while few groups can make random-effect variances difficult to estimate. Highly overlapping predictors, separation, and sparse positive counts can also destabilize estimation. Interpret model comparisons in light of these limitations and report which covariates were used in each component.

Check Your Understanding

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

  1. Write a hurdle model in which age appears in both components, while treatment appears only in the hurdle component.
  2. For \(\operatorname{logit}(q)=0\), calculate \(q\). What does this probability represent?
  3. A negative binomial parent model has \(\mu=2\) and \(\kappa=2\). Calculate the mean among positive counts.
  4. Why should a positive-count coefficient not be interpreted as a direct effect on the probability of any count?
  5. What does a likelihood-ratio test of a predictor in the count component compare?

Solutions: (1) One specification is \(\operatorname{logit}(q)=\beta_0^{(0)}+\beta_{\mathrm{age}}^{(0)}\mathrm{age}+\beta_{\mathrm{treat}}^{(0)}\mathrm{treatment}\) and \(\log(\mu)=\beta_0^{(+)}+\beta_{\mathrm{age}}^{(+)}\mathrm{age}\). The coefficients are distinct. (2) \(q=\exp(0)/[1+\exp(0)]=0.5\), the conditional probability that the count is positive. (3) \(f_{\mathrm{NB}}(0)=[2/(2+2)]^2=0.25\), so \(E(Y\mid Y>0)=2/(1-0.25)=2.667\) counts. (4) That probability is modeled by the hurdle equation; the positive-count coefficient enters the parent mean and the truncated positive-count distribution. (5) It compares nested models that differ in whether the predictor contributes to the positive-count component, while retaining the same observations and other likelihood assumptions.

Clinical Biostats