Why the Second Stage Is a Trap
Two-stage least squares is often introduced as a sequence of regressions: first predict an endogenous regressor using instruments, then regress the outcome on the prediction. This description is useful for understanding the coefficient, but it can suggest a dangerous shortcut: report the ordinary OLS standard error from that second regression. The coefficient is indeed the 2SLS coefficient, but the usual OLS standard error generally treats the fitted regressors and residuals as if they came from an ordinary regression. They do not.
The distinction matters because standard errors describe how an estimator varies across samples. Fitted regressors are generated from the instruments, and the 2SLS estimator's sampling variation depends on the instruments' relationship with the original regressors and the structural errors. The ordinary second-stage formula does not generally account for that structure.
For consistency of the usual IV interpretation, the instruments must satisfy the relevant moment conditions, such as \(E[z_i u_i]=0\), and the population rank condition must identify the coefficients. These assumptions do not make each individual instrument independent of every sample error, nor do they make the fitted regressors ordinary exogenous regressors. The fitted matrix is a projection of \(W\) onto the instrument space.
Same Coefficient, Different Inference
The fitted-regressor regression can reproduce the 2SLS coefficient exactly. Since \(P_Z\) is symmetric and idempotent, \(\hat W'=\!W'P_Z\) and \(\hat W'\hat W=W'P_ZW\). Therefore, the OLS coefficient in the regression of \(y\) on \(\hat W\) is
This equality is about the point estimate. The ordinary OLS standard-error formula also uses the second-stage residuals \(y-\hat W\hat\beta_{2SLS}\) and treats \(\hat W\) as the design matrix of a standard regression. But the structural residual is \(u=y-W\beta\). At the true coefficient, the second-stage residual contains the additional term \((W-\hat W)\beta\):
Thus, the second-stage residual is not generally the structural error. The standard OLS variance formula based on that residual and \((\hat W'\hat W)^{-1}\) is not generally the 2SLS variance formula. In particular, the OLS formula assumes a regression error with the usual conditional-mean and variance properties given the regressors; those properties do not follow merely because \(\hat W\) was produced by a first-stage regression.
Worked Example: Identical Coefficient, Different Standard Errors
Consider a hypothetical sample of four observations with an intercept and one endogenous regressor \(x\). The instrument matrix contains an intercept and a binary instrument \(z\).
| Observation | \(z\) | \(x\) | \(y\) |
|---|---|---|---|
| 1 | 0 | 1 | 3 |
| 2 | 0 | 2 | 5 |
| 3 | 1 | 4 | 8 |
| 4 | 1 | 5 | 10 |
The first stage predicts \(x\) by its group mean: \(\hat x=1.5\) for \(z=0\) and \(\hat x=4.5\) for \(z=1\). Thus \(\hat x=(1.5,1.5,4.5,4.5)'\). With an intercept, the second-stage slope is the difference in group mean outcomes divided by the difference in fitted-regressor means:
The second-stage intercept is \(4-(5/3)(1.5)=1.5\). Its second-stage residuals are \((-1,1,-1,1)'\), so the residual sum of squares is \(4\). With \(n=4\) and two estimated coefficients, the usual OLS residual variance estimate is \(4/(4-2)=2\). Since the centered fitted regressor has sum of squares \(9\), the ordinary OLS slope standard error is
For comparison, the structural residuals at the 2SLS estimates are \(y-1.5-(5/3)x=(-1/6,1/6,-1/6,1/6)'\). Their sum of squares is \(1/9\). A conventional homoskedastic 2SLS plug-in calculation using \(1/9\) divided by \(n-k=2\) gives an estimated error variance of \(1/18\). The corresponding slope variance uses the fitted-regressor sum of squares \(9\), giving
These are deliberately small-sample calculations, so neither is offered as a reliable inferential result for this tiny hypothetical data set. They show that identical coefficients do not imply identical standard errors: the residual used by the second-stage OLS calculation is not the structural residual used in 2SLS inference.
What the 2SLS Variance Formula Uses
For independent observations, a full-rank model, valid instrument moments, and suitable finite-moment conditions, the asymptotic variance under homoskedasticity has a specific form. Let \(Q_{WZ}=E[w_i z_i']E[z_i z_i']^{-1}E[z_i w_i']\). If the conditional second moment satisfies \(E[u_i^2\mid w_i,z_i]=\sigma^2\), the asymptotic covariance of the scaled estimation error is
Equivalently, the large-sample covariance of \(\hat\beta_{2SLS}\) itself is approximately \((\sigma^2/n)Q_{WZ}^{-1}\). The factor \(1/n\) is essential: the first expression is for the scaled estimator, and the second is for the estimator. In a sample, the conventional homoskedastic variance estimate has the form \(\hat\sigma^2(W'P_ZW)^{-1}\), with the error variance estimated from structural residuals and an appropriate degrees-of-freedom convention.
When error variance may differ across observations, a heteroskedasticity-robust 2SLS sandwich estimate is used instead. In matrix form, a common version is
where \(\hat u_i=y_i-w_i'\hat\beta_{2SLS}\) are structural residuals. This is a sandwich estimator for the 2SLS procedure, not the usual OLS variance formula applied to \(y\) regressed on \(\hat W\). Robustness to heteroskedasticity does not by itself solve weak identification, invalid instruments, dependence across observations, or other violations of the model assumptions.
Worked Example: Why the Projection Covariance Needs an Assumption
A useful algebraic identity explains one part of the homoskedastic variance calculation. Suppose, for this projection calculation, that conditional on a fixed instrument matrix \(Z\), the error vector has conditional mean zero and covariance \(\operatorname{Var}(u\mid Z)=\sigma^2 I\). Then
The last equality uses both symmetry, \(P_Z'=P_Z\), and idempotence, \(P_Z^2=P_Z\). This calculation explains why the projected error does not have covariance \(\sigma^2 I\): it has covariance on the instrument space, represented by \(\sigma^2P_Z\).
The assumption about the whole error covariance matrix is important. Equal conditional variances for each observation alone do not rule out conditional covariance between different observations. For example, the matrix
has the same conditional variance \(\sigma^2\) for each component but nonzero off-diagonal covariance. In that case the projection calculation gives \(P_Z\operatorname{Var}(u\mid Z)P_Z\), not necessarily \(\sigma^2P_Z\). The identity is therefore not justified by equal individual variances alone. This projection argument illustrates a covariance reduction under its stated condition; it is not a substitute for the moment and sampling assumptions required for the 2SLS asymptotic formula.
Worked Example: A Heteroskedasticity-Robust 2SLS Calculation
Consider a hypothetical through-origin model \(y_i=\beta w_i+u_i\) with one instrument \(z_i\). Use the sample \(z=(1,1,-1,-1)'\), \(w=(2,0,1,-1)'\), and \(y=(5,-1,4,-4)'\). These values satisfy \(y=2w+u\) for \(u=(1,-1,2,-2)'\), and \(z'u=0\). The instrument has a nonzero sample relationship with \(w\), since \(z'w=2\).
Because \(z'z=4\), the projection matrix is \(P_Z=zz'/4\). The fitted regressor is \(\hat w=P_Zw=(1/2,1/2,-1/2,-1/2)'\), and \(\hat w'\hat w=1\). Also, \(\hat w'y=2\), so \(\hat\beta_{2SLS}=2\). The structural residuals are the stated \(u\), with squared values \((1,1,4,4)\).
The robust sandwich's middle scalar is \(\hat w'\operatorname{diag}(\hat u_i^2)\hat w\). Substituting the fitted values and squared residuals gives
Since the outside factors are each \(1/(\hat w'\hat w)=1\), the estimated robust variance is \(2.5\), and the robust standard error is \(\sqrt{2.5}\approx1.581\). For contrast, the ordinary second-stage regression has residuals \(y-2\hat w=(4,-2,5,-3)'\), with sum of squares \(54\). Its ordinary OLS standard error is \(\sqrt{(54/3)/1}=\sqrt{18}\approx4.243\). The robust 2SLS calculation uses structural residuals and the projected-regressor sandwich; the ordinary OLS calculation uses second-stage residuals and an OLS formula. This four-observation computation illustrates the formulas, not dependable finite-sample inference.
Common Mistake and Practical Interpretation
Wrong reasoning: “The second-stage fitted-regressor regression produces the 2SLS coefficient, so its ordinary OLS standard error must be the 2SLS standard error.” The coefficient equality only follows from the projection algebra. It does not establish that the second-stage residuals, conditional variance assumptions, or sampling-variance formula are those of OLS.
Correction: Report the 2SLS coefficient with a 2SLS variance estimator appropriate to the assumptions. Use a homoskedastic 2SLS estimator only when that variance assumption is defensible; otherwise use a heteroskedasticity-robust 2SLS estimator, or a method suitable for the relevant dependence structure. If the reported standard error comes from a regression of the outcome on generated fitted values using the ordinary OLS formula, verify that the software has instead calculated valid 2SLS inference.
The key distinction is between a computational representation and an inferential procedure. Regressing on fitted regressors is one way to obtain the 2SLS point estimate. It does not turn the fitted regressors into observed exogenous regressors, nor does it make the ordinary second-stage OLS standard error valid in general.
Check Your Understanding
Try these questions using the formulas and distinctions above.
- Why does OLS of \(y\) on \(\hat W=P_ZW\) produce the 2SLS coefficient?
- Write the second-stage residual at the true coefficient in terms of \(u\), \(W\), \(\hat W\), and \(\beta\). Why does this matter for ordinary OLS inference?
- What is the difference between the asymptotic covariance of \(\sqrt n(\hat\beta-\beta)\) and the approximate covariance of \(\hat\beta\)?
- Why do equal conditional variances for individual errors not, by themselves, imply \(\operatorname{Var}(P_Zu\mid Z)=\sigma^2P_Z\)?
- Which residuals appear in the heteroskedasticity-robust 2SLS sandwich estimator: second-stage residuals or structural residuals?