Tutorials › Econometrics (Graduate) › Control Functions For Poisson And Count Outcomes

Endogeneity and Control Functions · Tutorial 240 of 952

Control Functions For Poisson And Count Outcomes

Build and interpret residual-inclusion models for endogenous regressors when the outcome is a count.

Advanced 9 min read

What You'll Learn

  • Specify a first-stage equation and construct its estimated residual for a continuous endogenous regressor.
  • State the conditional-mean and distributional assumptions behind Poisson and negative-binomial residual-inclusion models.
  • Derive the exponential conditional-mean correction that motivates including the residual.
  • Calculate fitted count means and variances from both model specifications.
  • Interpret the residual coefficient as evidence about conditional dependence, not as a causal effect.
  • Identify why replacing the endogenous regressor with its fitted value is not the same as residual inclusion.

Why Include a First-Stage Residual?

A count outcome might record the number of hospital visits, insurance claims, or purchases. A Poisson or negative-binomial model can describe such outcomes through a conditional mean, often using an exponential function to keep fitted means positive. But if a regressor is endogenous, an ordinary count regression can still give a misleading estimate: the regressor may be related to unobserved determinants of the count.

A control-function approach addresses this problem by using the first-stage residual as an additional outcome-regression variable. The residual summarizes the part of the endogenous regressor not explained by the instruments and included exogenous covariates. Under a suitable conditional-dependence assumption, including it makes the remaining variation in the regressor conditionally unrelated to the outcome disturbance. The approach is not justified merely by the fact that a residual can be calculated; its validity depends on the first-stage and outcome-model assumptions stated below.

Setup: For observation \(i\), let \(Y_i\) be a count outcome, \(x_i\) a continuous endogenous regressor, \(w_i\) a vector of included exogenous covariates, and \(z_i\) a vector of excluded instruments. A linear first stage is $$ x_i = z_i'\pi + w_i'\kappa + v_i, $$ where \(v_i\) is the first-stage disturbance. Estimate this equation and define the generated residual \(\hat v_i=x_i-z_i'\hat\pi-w_i'\hat\kappa\).

The instruments must predict \(x_i\) conditional on \(w_i\), and the excluded instruments must not have a direct effect on the outcome conditional on the structural regressors and the control function. In addition, the control function must adequately summarize the dependence between \(x_i\) and the outcome disturbance. These are substantive identification and specification requirements, not properties guaranteed by a two-stage calculation.

From a Conditional Error Decomposition to a Count Mean

A useful way to see the logic is to suppose that the structural conditional mean before accounting for endogeneity has a multiplicative unobserved component:

$$ E[Y_i\mid x_i,w_i,u_i]=\exp(x_i\beta+w_i'\gamma+u_i). $$

Here \(u_i\) captures unobserved determinants of the outcome. If \(x_i\) is endogenous, \(u_i\) and the first-stage disturbance \(v_i\) are conditionally dependent. A linear control-function specification assumes a decomposition \(u_i=\lambda v_i+\varepsilon_i\), with the conditional expectation \(E[\exp(\varepsilon_i)\mid v_i,w_i,z_i]\) constant. The constant can be absorbed into the intercept. Taking the conditional expectation over \(\varepsilon_i\) then gives:

$$ \begin{aligned} E[Y_i\mid x_i,w_i,v_i] &=\exp(x_i\beta+w_i'\gamma+\lambda v_i) E[\exp(\varepsilon_i)\mid v_i,w_i,z_i]\\ &=\exp(\beta_0+x_i\beta+w_i'\gamma+\lambda v_i), \end{aligned} $$

where \(\beta_0\) includes the constant factor. This calculation motivates including \(v_i\) in the exponential index. A suitable joint normal model for latent errors can imply a linear conditional correction of this form, but linearity is an assumption about the conditional dependence, not a universal consequence of endogeneity. More generally, the correction may be a nonlinear function \(h(v_i)\); then a linear residual term may be misspecified.

Control-function count mean: Under the linear residual-inclusion specification, estimate $$ E[Y_i\mid x_i,w_i,v_i] =\mu_i =\exp(\beta_0+x_i\beta+w_i'\gamma+\lambda v_i). $$ In practice, \(v_i\) is replaced by the estimated first-stage residual \(\hat v_i\). The coefficient \(\lambda\) captures the modeled association between the first-stage disturbance and the conditional outcome mean, after conditioning on \(x_i\) and \(w_i\).

Poisson Residual Inclusion

For a conditional Poisson model, the distributional assumption is \(Y_i\mid x_i,w_i,v_i\sim\operatorname{Poisson}(\mu_i)\), with \(\mu_i\) given by the control-function mean above. A Poisson random variable has conditional mean \(\mu_i\) and conditional variance \(\mu_i\). The likelihood contribution for an observed count \(y_i\) is \(e^{-\mu_i}\mu_i^{y_i}/y_i!\). The Poisson distribution is a full conditional-distribution assumption; if the target is only the conditional mean, Poisson quasi-maximum likelihood can instead be used with a correctly specified mean and an appropriate robust variance estimator.

Worked Example: Constructing and Using a Poisson Control Function

Suppose a hypothetical study models the number of annual service visits \(Y_i\). The first-stage estimate for visits’ endogenous predictor \(x_i\) is \(\hat x_i=0.8+0.5z_i+0.3w_i\). For one individual, \(z_i=2\), \(w_i=1\), and the observed \(x_i=2.6\). The fitted first-stage value and residual are:

$$ \hat x_i=0.8+0.5(2)+0.3(1)=2.1, \qquad \hat v_i=2.6-2.1=0.5. $$

Suppose the estimated Poisson conditional mean is \(\hat\mu_i=\exp(-0.4+0.25x_i+0.2w_i+0.6\hat v_i)\). Substituting the observed values gives:

$$ \hat\mu_i =\exp[-0.4+0.25(2.6)+0.2(1)+0.6(0.5)] =\exp(0.75) \approx 2.117. $$

Under the fitted model, this individual’s conditional expected number of annual visits is about 2.117. The model’s conditional Poisson variance for this individual is also 2.117. Holding \(x_i\) and \(w_i\) fixed, a one-unit increase in the residual changes the fitted mean by the factor \(\exp(0.6)\approx1.822\). That is a model-based conditional association, not a causal effect of changing a residual.

The calculation requires more than a good numerical fit. It relies on the instrument exclusion and relevance conditions, a valid first-stage residual, and the assumption that the linear residual term adequately controls the relevant dependence. If the conditional Poisson distribution is assumed, that distributional specification is also required; for a mean-only Poisson fit, the conditional mean must still be correctly specified.

Negative-Binomial Residual Inclusion

A negative-binomial model keeps the same control-function conditional mean but allows more conditional variance than the Poisson model. Use the NB2 parameterization, in which \(Y_i\mid x_i,w_i,v_i\) has a negative-binomial distribution with mean \(\mu_i\) and dispersion parameter \(\alpha>0\):

$$ E[Y_i\mid x_i,w_i,v_i]=\mu_i, \qquad \operatorname{Var}(Y_i\mid x_i,w_i,v_i)=\mu_i+\alpha\mu_i^2. $$

The conditional mean can be specified as \(\exp(\beta_0+x_i\beta+w_i'\gamma+\lambda v_i)\), with \(\hat v_i\) used in estimation. The additional dispersion parameter allows the conditional variance to exceed the conditional mean. It does not, by itself, correct endogeneity: the control-function assumptions are still needed. A standard distributional interpretation of NB2 is a Poisson count conditional on a gamma-distributed rate, with the gamma variation independent of the covariates and control function given the specified conditional mean.

Worked Example: Negative-Binomial Mean and Variance

Consider a hypothetical model for the number of monthly claims, with estimated conditional mean \(\hat\mu_i=\exp(-0.2+0.3x_i-0.1w_i+0.5\hat v_i)\) and estimated NB2 dispersion \(\hat\alpha=0.4\). For an individual with \(x_i=1.5\), \(w_i=2\), and \(\hat v_i=-0.4\), the index is:

$$ -0.2+0.3(1.5)-0.1(2)+0.5(-0.4) =-0.2+0.45-0.2-0.2=-0.15. $$

Thus the fitted mean is \(\hat\mu_i=\exp(-0.15)\approx0.8607\) claims per month. The NB2 conditional variance is:

$$ \widehat{\operatorname{Var}}(Y_i\mid x_i,w_i,\hat v_i) =\hat\mu_i+\hat\alpha\hat\mu_i^2 =0.8607+0.4(0.8607^2) \approx0.8607+0.2963 =1.157. $$

The fitted variance, about 1.157 squared claims, exceeds the fitted mean of 0.8607 claims because the estimated dispersion is positive. Holding \(w_i\) and \(\hat v_i\) fixed, a one-unit increase in \(x_i\) multiplies the fitted mean by \(\exp(0.3)\approx1.350\), or increases it by about 35.0%. This is a conditional mean comparison under the model, not evidence that the coefficient is causal without the identifying assumptions.

Estimation, Interpretation, and a Residual Check

A basic two-step implementation estimates the first-stage regression of \(x_i\) on \(z_i\) and \(w_i\), saves \(\hat v_i\), and then estimates the Poisson or negative-binomial outcome model using \(x_i\), \(w_i\), and \(\hat v_i\). The structural coefficient \(\beta\) describes the conditional log-mean slope for \(x_i\), holding the included covariates and control function fixed. In particular, a one-unit increase in \(x_i\) multiplies the model’s conditional mean by \(\exp(\beta)\), under the specified model. The residual coefficient \(\lambda\) is not the effect of an intervention on the residual; it is a parameter in the correction for conditional dependence.

Testing \(H_0:\lambda=0\) can provide a diagnostic for endogeneity within this particular specification. A nonzero estimate is evidence of residual dependence conditional on the included variables, if the model and inference are valid. A failure to reject does not establish exogeneity: the test may have limited power, and misspecified instruments, first stages, or control functions can undermine its interpretation. Standard errors must account for the fact that \(\hat v_i\) was estimated in the first stage. Treating it as a directly observed covariate and using an ordinary second-stage variance formula can understate or otherwise misstate uncertainty; use inference appropriate for estimated control functions.

Worked Example: Testing the Residual Term

Suppose a hypothetical Poisson residual-inclusion fit gives \(\hat\lambda=0.45\) with a standard error that accounts for first-stage estimation of \(0.18\). To test \(H_0:\lambda=0\) against \(H_a:\lambda\ne0\), the large-sample Wald statistic is:

$$ z=\frac{\hat\lambda-0}{SE(\hat\lambda)} =\frac{0.45}{0.18}=2.50. $$

Using a standard normal reference distribution, the two-sided p-value is \(2[1-\Phi(2.50)]\approx0.0124\). At significance level \(\alpha=0.05\), reject \(H_0\) for this fitted specification. An approximate 95% Wald interval is:

$$ 0.45\pm1.96(0.18) =0.45\pm0.3528 =[0.0972,\;0.8028]. $$

The interval is in units of the model’s log conditional mean per unit of first-stage residual. It excludes zero, consistent with the test. The result indicates evidence that the residual term contributes to the specified conditional mean; it does not prove that the instruments are valid, that the linear control function is correct, or that endogeneity has been completely removed.

Why Fitted-Value Substitution Is Not the Same Procedure

A common error is to replace \(x_i\) by its first-stage fitted value \(\hat x_i\) in the nonlinear outcome model and treat the resulting regression as a solution to endogeneity. In nonlinear models, this generally changes the conditional mean being modeled and does not reproduce the control-function correction. Residual inclusion instead retains the observed \(x_i\) and adds \(\hat v_i\), relying on the specified conditional-dependence relationship. This distinction matters because the exponential mean is nonlinear: substituting a fitted regressor is not generally equivalent to conditioning on the residual.

The residual-inclusion approach is also not automatic protection against misspecification. The first stage must capture the conditional mean of \(x_i\) sufficiently well; instruments must be relevant and excluded from the structural outcome equation; and the assumed residual correction must be adequate. If the relationship between the residual and the conditional mean is nonlinear, a linear term \(\lambda\hat v_i\) may not suffice. A negative-binomial dispersion term can accommodate overdispersion, but it cannot repair a failed exclusion restriction or an inadequate control function.

Key takeaway: For a count outcome with one continuous endogenous regressor, residual inclusion retains the observed regressor and adds its estimated first-stage residual to the conditional-mean index. The Poisson or negative-binomial distribution governs conditional count variation; the control-function assumptions, not the choice of count distribution, do the work of addressing endogeneity.

Check Your Understanding

Work through these questions using the definitions and assumptions in this tutorial.

  1. Write a linear first-stage equation for an endogenous continuous regressor \(x_i\), and define its estimated residual.
  2. In a Poisson residual-inclusion model, what does \(\exp(\beta)\) represent for a one-unit increase in \(x_i\), holding the other index terms fixed?
  3. Under the NB2 parameterization, calculate the conditional variance when \(\mu_i=2\) and \(\alpha=0.25\).
  4. Why does a significant estimate of \(\lambda\) not establish that the excluded instruments are valid?
  5. Explain why a negative-binomial dispersion parameter does not, by itself, address endogeneity.
Clinical Biostats