Why a Vector Control Function Is Needed
When an outcome equation contains several endogenous regressors, each regressor can have its own source of dependence on the structural error. A control function must therefore preserve the separate information in each first stage. Adding only one residual, or adding one residual for every instrument, generally does not represent that structure.
The construction begins with a first-stage equation for each endogenous variable. The resulting residuals are collected into a vector and included together in the outcome equation. Under a specified conditional error decomposition, their coefficients describe how the structural error depends on the first-stage disturbances. A joint test that all those coefficients are zero is then a test of exogeneity within that model.
First Stages and the Dimension of the Residual Vector
Let \(y_i\) be the outcome for observation \(i\), let \(x_i\) be a vector of included exogenous regressors, and let \(d_i=(d_{i1},\ldots,d_{iq})'\) contain the \(q\) endogenous regressors. Let \(z_i\) denote excluded instruments. A linear first-stage specification for each endogenous regressor is
Here, \(v_{ij}\) is the disturbance in the first stage for endogenous regressor \(j\). The corresponding fitted value and residual are
Collect the residuals in the order of the endogenous regressors:
Thus, the vector has dimension \(q\), even if the number of excluded instruments is not \(q\). The instruments enter the first stages and help predict the endogenous regressors; they do not each generate a separate control-function component. If two endogenous regressors have different first-stage residuals, those two components should not be collapsed into one without an additional model restriction.
With ordinary least squares first stages that include an intercept and the same regressors \(x_i,z_i\), each residual column is orthogonal in the sample to every included first-stage regressor. In matrix form, if \(W\) is the first-stage design matrix, \(D\) is the \(n\)-by-\(q\) matrix of endogenous regressors, and \(\widehat V\) is the matrix of first-stage residuals, then
This is a property of the fitted OLS projections, not a statement that the residual columns must be orthogonal to one another. They may be correlated with each other, and their correlation can matter for joint inference.
Worked Example: Constructing Two First-Stage Residuals
Consider four hypothetical observations, with an intercept and one instrument \(z_i\) in each first stage. The instrument values are \((-1,0,1,2)\). The observed values are \(d_1=(4.5,2.5,6.5,6.5)'\) and \(d_2=(1.5,3,0.5,4)'\). Find the two OLS first-stage residual columns.
For \(d_1\), the means are \(\bar z=0.5\) and \(\bar d_1=5\). The OLS slope is
The intercept is \(\widehat\pi_1=\bar d_1-\widehat\gamma_1\bar z=5-0.5=4.5\). Therefore \(\widehat d_1=4.5+z\), giving fitted values \((3.5,4.5,5.5,6.5)'\) and residuals
For \(d_2\), \(\bar d_2=2.25\), and the slope numerator is \(1.125-0.375-0.875+2.625=2.5\), while the denominator remains \(5\). Thus \(\widehat\gamma_2=0.5\), and the intercept is \(\widehat\pi_2=2.25-0.5(0.5)=2\). The fitted values are \((1.5,2,2.5,3)'\), so
The vector of residuals for observation \(i\) is \((\widehat v_{i1},\widehat v_{i2})'\), so it has two components. As a projection check, both residual columns sum to zero; their inner products with \(z\) are \(1(-1)+(-2)(0)+1(1)+0(2)=0\) and \(0(-1)+1(0)+(-2)(1)+1(2)=0\). These checks match the first stages with an intercept and \(z\).
From a Conditional Error Decomposition to the Outcome Equation
The residual-inclusion argument requires more than computing first stages. It requires a model for how the structural error depends on the first-stage disturbances. For a linear outcome equation, write
A vector linear control-function representation assumes that the error can be decomposed as
where \(v_i=(v_{i1},\ldots,v_{iq})'\) is the vector of population first-stage disturbances and \(\lambda\) is a \(q\)-component coefficient vector. This is a substantive modeling condition: it says that, after accounting for the first-stage disturbance vector, the remaining structural error has conditional mean zero. It is not guaranteed merely because first-stage residuals can be calculated.
Substituting this decomposition into the structural equation gives
In estimation, the population disturbances \(v_i\) are unobserved, so the fitted first-stage residuals \(\widehat v_i\) are used as their estimates. The augmented regression includes all \(q\) residual components:
The coefficient on \(\widehat v_{ij}\) is a partial coefficient: it describes the association with the outcome of that residual component holding the other included regressors and the other residual components fixed. It is not, by itself, a causal effect of the first-stage disturbance.
Testing the Residual Coefficients Jointly
Let \(\widehat\lambda\) be the estimated coefficient vector from the augmented outcome equation, and let \(\widehat{\operatorname{Var}}(\widehat\lambda)\) be a covariance estimate appropriate to the model and sampling assumptions. The Wald statistic for the joint null is
If the covariance estimator is consistent and the regularity conditions for the Wald test hold, then under \(H_0\), \(W\) is asymptotically distributed as chi-square with \(q\) degrees of freedom. A small p-value is evidence against the joint null within the specified control-function model. A large p-value means the data do not provide sufficient evidence against that null; it does not prove that every endogenous regressor is exogenous.
In finite samples, an \(F\)-test may be appropriate under the classical linear-model conditions, such as homoskedastic errors and the relevant distributional assumptions. With heteroskedasticity or other departures from those conditions, use a covariance estimator and joint test suited to them. Because the residuals are estimated in first stages, inference should account for that estimation rather than treating the fitted residuals as observed without error. The exact procedure depends on the model and covariance assumptions.
A joint test uses the covariance among the estimated residual coefficients. Testing each coefficient separately and relying on whether any individual p-value crosses a threshold is not the same test: it can fail to reflect the joint uncertainty and correlation in \(\widehat\lambda\).
Worked Example: A Joint Test With Two Residual Coefficients
Suppose a hypothetical augmented regression with two endogenous regressors estimates \(\widehat\lambda=(0.30,-0.10)'\). Assume the appropriate estimated covariance matrix is
Test \(H_0:\lambda_1=\lambda_2=0\). The determinant of this covariance matrix is \(0.0400(0.0225)-0.0100^2=0.0008\), so its inverse is
The joint Wald statistic is therefore
Under the large-sample chi-square reference distribution with \(df=2\), the p-value is approximately \(0.151\). At significance level \(\alpha=0.05\), this result does not reject the joint exogeneity null. It is not evidence that the null is true; it says these estimates do not provide sufficiently strong evidence against both residual coefficients being zero. The result concerns the joint restriction, including the covariance between the two estimates.
Three Endogenous Regressors: The Count Is Still Three
The dimension rule is unchanged when the model contains more endogenous regressors. Suppose \(d_i\) contains three variables: a treatment dose, a price, and an input quantity. Estimate one first stage for each, using the specified included exogenous variables and instruments. The resulting fitted residual vector is \((\widehat v_{i1},\widehat v_{i2},\widehat v_{i3})'\), and the augmented outcome equation has three residual coefficients. Even if the first stages use five excluded instruments, the control-function vector still has three components.
Worked Example: A Three-Component Exogeneity Test
In a hypothetical model with three endogenous regressors, suppose the estimated residual coefficient vector is \(\widehat\lambda=(0.12,-0.08,0.20)'\). For illustration, assume its appropriate estimated covariance matrix is diagonal, with variances \(0.0400\), \(0.0100\), and \(0.0625\). Test that all three coefficients are zero.
Because the covariance matrix is diagonal, each squared coefficient is divided by its estimated variance:
The reference distribution under the joint null is chi-square with \(df=3\), giving a p-value of approximately \(0.650\). At the 5% level, the joint null is not rejected. The calculation illustrates two points: the test has one restriction per endogenous regressor, and the diagonal covariance assumption is what permits the sum-of-squared-standardized-coefficients calculation. If the covariance matrix were not diagonal, its off-diagonal entries would also enter the Wald statistic.
What the Test Does—and Does Not—Establish
A joint residual-coefficient test addresses whether the included control-function terms are jointly needed under the assumed representation. Its interpretation relies on the specified outcome equation, first-stage conditional means, and conditional error decomposition. If those conditions are poor descriptions of the data, a non-rejection does not rule out endogeneity in every broader sense.
The test also does not establish that the instruments are valid. Instrument validity concerns whether the excluded instruments satisfy the required restrictions, including their exclusion from the structural error. The residual-coefficient test is a different question: under the adopted model and instrument setup, do the endogenous regressors appear exogenous with respect to the structural error? A result about one question cannot substitute for evidence about the other.
Common Mistakes
- Using one residual for several endogenous regressors. A single residual generally discards information about distinct first-stage disturbances. Include one residual for each endogenous regressor unless the model explicitly imposes a lower-dimensional control-function structure.
- Using one residual per instrument. The control-function dimension follows the number of endogenous regressors, not the number of instruments. Instruments enter the first-stage equations used to calculate those residuals.
- Testing coefficients one at a time and calling that a joint test. The joint Wald test uses the full estimated covariance matrix and imposes all zero restrictions simultaneously.
- Calling a non-rejection proof of exogeneity. The test may have limited power, and its conclusion is conditional on the specification and assumptions. Report it as insufficient evidence against the joint null, not as confirmation that the null is true.
- Treating a residual-coefficient test as a test of instrument validity. These are distinct restrictions. A joint residual test does not certify the exclusion or exogeneity of the instruments.
Check Your Understanding
Answer each question using the vector structure and the assumptions described above.
- A model has four endogenous regressors and seven excluded instruments. How many components does its first-stage residual vector have, and why?
- In OLS first stages with an intercept and the same instruments, what sample orthogonality checks should each residual column satisfy?
- State the joint null tested by the residual coefficients in a model with three endogenous regressors.
- Why is a joint Wald test not generally equivalent to checking whether any one of three individual p-values is below 0.05?
- Does failing to reject the joint residual-coefficient null establish that the instruments are valid? Explain the distinction.