What a Control-Function Test Can Tell You
In a nonlinear outcome model, treatment endogeneity can affect the outcome equation even when the instrument predicts treatment. A control-function approach tries to account for the part of treatment associated with unobserved factors that also affect the outcome. Testing whether that control function contributes to the outcome model can provide evidence about endogeneity, but only under a specified model and its assumptions.
The test is not a general-purpose test of whether an instrument is valid. Its interpretation depends on the first-stage model, the assumed relationship between treatment and unobserved outcome determinants, and the outcome model. A significant control-function term may indicate endogeneity under those assumptions; it may also reveal that one or more of the assumptions or models are inadequate.
Model and Conditions for the Test
Let \(Y\) be an outcome, \(T\) a treatment that may be endogenous, \(X\) observed covariates, and \(Z\) excluded instrument variables. A first stage models treatment using \(X\) and \(Z\). For a continuous treatment with a linear first stage, write
where \(V\) is the first-stage disturbance. In a simple linear first stage, \(m(Z,X)=Z'\pi_Z+X'\pi_X\), and the estimated control function is the residual \(\hat V=T-\hat m(Z,X)\). The outcome model includes \(T\), \(X\), and a specified function of \(\hat V\). For example, for a binary outcome with logistic link:
For a nonlinear first stage, the appropriate control function need not be an ordinary residual. It may be a generalized residual or another control-function quantity derived from the assumed first-stage distribution. For example, with a binary treatment and a probit first stage, let \(\eta=Z'\pi_Z+X'\pi_X\). A generalized residual based on the latent normal error is
where \(D\) is the binary treatment and \(\phi\) and \(\Phi\) are the standard normal density and distribution functions. This is a model-based residual, not simply \(D-\hat P(D=1\mid Z,X)\). The correct choice depends on the first-stage model and the control-function assumptions.
The test requires more than fitting these two equations. The instrument must be relevant conditional on \(X\), independent of the relevant unobserved causes of treatment and outcome conditional on \(X\), and excluded from the structural outcome except through treatment. The first-stage model and the control-function representation must be correctly specified, and the nonlinear outcome model must also be adequate. There must be enough variation and support to estimate the coefficients. These are substantive and statistical conditions, not facts established by a significant test statistic.
If the chosen control function is \(r\), the usual single-term test is \(H_0:\gamma=0\) against \(H_a:\gamma\ne 0\). If the model includes several control-function terms, such as \(r\) and \(r^2\), the relevant null is that all their coefficients are zero. Testing just one term when the assumed control-function representation requires several can miss the dependence the model is intended to capture.
Why the Null Corresponds to No Represented Endogeneity
The logic is conditional. Suppose that, under the structural model, the outcome disturbance is independent of treatment once \(X\) is held fixed. Then learning the first-stage disturbance \(V\), beyond knowing \(T\) and \(X\), should not provide additional information about the outcome. In a correctly specified outcome model that represents this dependence through \(h(V)\), the coefficients on those control-function terms should therefore be zero.
Conversely, when unobserved factors jointly influence treatment and outcome, \(V\) can carry information about those factors. Conditional on treatment and \(X\), the control function can then help explain the outcome, giving nonzero coefficients. This is the motivation for the test; it is not a guarantee that every form of endogeneity will be captured by every chosen control function.
A Wald test for one coefficient uses the estimate and its standard error:
For a vector of \(q\) control-function coefficients \(\hat{\boldsymbol\gamma}\), with estimated covariance matrix \(\widehat{\operatorname{Var}}(\hat{\boldsymbol\gamma})\), the joint Wald statistic is
The reference distribution is an approximation under the null and the model’s regularity conditions. A p-value compares the observed statistic with that null distribution; it is not the probability that the null hypothesis is true.
Worked Example: A Single Residual Term in a Logistic Outcome Model
Hypothetical data. Suppose researchers model whether a patient experiences a binary outcome after receiving a continuous treatment measured in dose units. They estimate a linear first stage using an excluded instrument and covariates. For one patient, the observed dose is 3.4 units and the fitted first-stage dose is 3.0 units, so the estimated residual is \(3.4-3.0=0.4\) dose units. In the logistic outcome model, the fitted control-function coefficient is \(\hat\gamma=0.70\) per residual dose unit, with \(SE(\hat\gamma)=0.28\).
The hypotheses are \(H_0:\gamma=0\) and \(H_a:\gamma\ne 0\). The Wald statistic is
Under \(H_0\), \(W\) is approximately chi-squared with 1 degree of freedom. The two-sided p-value is approximately \(0.0124\). At \(\alpha=0.05\), reject \(H_0\): the fitted residual term provides evidence of a dependence represented by this control-function model. Its exponentiated coefficient is \(\exp(0.70)=2.01\): for a one-unit increase in the residual, the model’s conditional odds of the outcome are multiplied by about 2.01, holding treatment and covariates fixed. This is not, by itself, a causal treatment effect or a test that the instrument satisfies its assumptions.
This conclusion presumes an adequate first stage, a valid instrument, and a correctly specified logistic outcome and control-function representation. The arithmetic alone cannot verify those conditions.
Estimation and Inference With an Estimated Control Function
The control function is usually estimated rather than observed. Consequently, treating \(\hat V\) as fixed in the second-stage regression can understate uncertainty. The standard error used for the test should account for first-stage estimation. Suitable approaches include a sandwich variance derived for the full two-step estimator or a bootstrap that repeats both stages in each resample. A second-stage likelihood-ratio test is appropriate only when the likelihood being compared is correctly specified for the full estimation procedure; an ordinary second-stage likelihood does not automatically account for an estimated residual.
The chosen test should match the control-function specification. If the model includes a linear residual and its square, test them jointly unless the scientific model justifies a narrower hypothesis. If the first stage is nonlinear, use the generalized residual or control function justified by that first-stage model rather than substituting an arbitrary residual. The earlier material on generalized residuals for nonlinear first stages develops how such residuals arise.
Worked Example: A Joint Test of Two Control-Function Terms
Hypothetical data. In a count-outcome model, suppose the specified control function includes a generalized residual \(r\) and its square \(r^2\). The fitted coefficients are \(\hat\gamma_1=0.40\) with standard error \(0.25\), and \(\hat\gamma_2=-0.30\) with standard error \(0.20\). For illustration, suppose their estimated covariance is zero. The null is \(H_0:\gamma_1=\gamma_2=0\); the alternative is that at least one is nonzero.
With zero estimated covariance, the joint Wald statistic is the sum of the squared individual standardized estimates:
There are \(q=2\) restrictions, so compare \(4.81\) with a chi-squared distribution with 2 degrees of freedom. The p-value is approximately \(0.0902\). At \(\alpha=0.05\), do not reject the joint null. This result is not proof that the treatment is exogenous; it means the fitted terms do not provide sufficiently strong evidence against their joint null at this significance level. If the covariance were not zero, it would need to be included in the matrix-form Wald calculation.
What a Significant or Nonsignificant Result Means
A significant test is evidence against the specified zero-control-function restriction, conditional on the model and its assumptions. If those assumptions hold, that is evidence of endogeneity captured by the control function. However, significance can also arise from a misspecified first-stage distribution, an inadequate outcome link, omitted nonlinearities, or a wrongly chosen control-function form. Instrument invalidity can likewise undermine the interpretation: the test does not distinguish those failures from the intended endogeneity mechanism.
A nonsignificant result is not evidence that treatment is certainly exogenous. The test may have low power, especially with weak instruments, limited sample size, or imprecisely estimated control functions. It only indicates that the data did not provide enough evidence to reject the specified null at the chosen significance level. Instrument relevance, independence, and exclusion still require substantive justification and appropriate diagnostics; a control-function test does not certify them.
The test also is not a universal replacement for comparisons between estimators. Nonlinear models can have different parameter interpretations and functional forms, so a change in a treatment coefficient across models does not by itself test endogeneity. The control-function test asks a narrower question: do the included residual-based terms contribute under this particular model? Its answer should not be stretched to a different estimand or model.
Worked Example: A Nonsignificant Test Is Not Proof of Exogeneity
Hypothetical data. Consider a binary outcome model with a single estimated first-stage residual term. Suppose \(\hat\gamma=-0.18\) and \(SE(\hat\gamma)=0.15\), with the standard error accounting for estimation of the first stage.
The test statistic is
The two-sided p-value is approximately \(0.230\). At \(\alpha=0.05\), do not reject \(H_0:\gamma=0\). The correct conclusion is that this analysis does not find statistically significant evidence for the specified control-function term. It does not establish that \(\gamma=0\), rule out other forms of endogeneity, or show that the instrument is valid.
For example, weak first-stage prediction could make the residual term imprecisely estimated. The test’s p-value does not diagnose that problem; first-stage strength and the instrument’s substantive plausibility must be considered separately.
Diagnostics and Practical Limits
Before interpreting the test, check whether its model is plausible. Examine first-stage fit and instrument relevance, but do not treat a strong first stage as proof of exclusion or independence. Check that the selected generalized residual matches the first-stage distribution and that the outcome link and conditional mean or probability model are appropriate. For continuous treatments, inspect residual patterns and consider whether the assumed residual function is adequate. For nonlinear first stages, ensure the fitted probabilities or other model-based predictions are not systematically poor in important covariate regions.
A single control-function term tests only the dependence encoded by that term. A zero coefficient can coexist with endogeneity that the chosen function fails to represent. Conversely, adding many residual transformations without a justified model can make the test unstable and difficult to interpret. The appropriate terms should be determined by the structural and distributional assumptions, not selected solely to obtain a desired p-value.
The most important pitfall is to treat rejection as a test of instrument validity. The wrong reasoning is: “The residual coefficient is significant, so the instrument is invalid,” or, in the opposite direction, “It is not significant, so the instrument is valid.” Neither conclusion follows. The correction is to interpret the statistic as a model-dependent test of the specified control-function restriction, and to assess relevance, independence, and exclusion on their own grounds.
Check Your Understanding
Answer each question, then compare your reasoning with the solutions.
- A logistic outcome model includes a first-stage residual with estimate \(0.36\) and standard error \(0.18\). Calculate the Wald statistic and its approximate two-sided p-value. At \(\alpha=0.05\), what is the conclusion?
- A model contains coefficients on \(r\) and \(r^2\). What null should be tested to assess whether the specified control-function terms contribute jointly?
- Why should uncertainty from the estimated first stage be reflected in the standard error or resampling procedure?
- A control-function test has p-value \(0.41\). Does this establish instrument validity or treatment exogeneity? Explain.
Solutions. (1) \(z=0.36/0.18=2.00\), so \(W=2.00^2=4.00\) on 1 degree of freedom; the two-sided p-value is approximately \(0.0455\). Reject \(H_0:\gamma=0\) at the 0.05 level, conditional on the model and assumptions. (2) Test \(H_0:\gamma_1=\gamma_2=0\) against the alternative that at least one coefficient is nonzero, using a 2-degree-of-freedom joint test. (3) The residual is estimated from the first-stage data, so treating it as known can omit uncertainty from first-stage estimation and produce an inappropriate standard error. (4) No. The result is a failure to reject the specified control-function null, not proof of exogeneity or of instrument relevance, independence, or exclusion.