Tutorials › Propensity Score Matching and Instrumental Variables › Confidence Intervals From 2SLS Estimates

Two-Stage Least Squares · Tutorial 498 of 699

Confidence Intervals From 2SLS Estimates

Build and interpret 2SLS confidence intervals by combining the coefficient estimate with an appropriate standard error and critical value.

Advanced 12 min read

What You'll Learn

  • Construct Wald intervals for individual 2SLS coefficients.
  • Form intervals for linear contrasts using the full covariance matrix.
  • Distinguish homoskedastic, heteroskedasticity-robust, and cluster-robust uncertainty estimates.
  • State the identification and sampling conditions behind interval coverage.
  • Recognize why few clusters, weak identification, or an unsuitable covariance estimator can undermine an interval.

From a 2SLS Estimate to an Interval

A 2SLS estimate is not reported in isolation: its uncertainty is part of the result. A confidence interval gives a range of parameter values compatible with the estimate and its estimated sampling variability under a specified model. The interval’s width depends on both the standard error and the critical value, so changing the covariance estimator can change the interval even when the 2SLS coefficient estimate stays the same.

Let the linear structural model be \(y=X\beta+u\), where \(y\) is an \(n\)-vector, \(X\) is an \(n\times k\) matrix of regressors, \(\beta\) is the \(k\)-vector of coefficients, and \(u\) is the error vector. Some regressors in \(X\) may be endogenous. Let \(Z\) be the \(n\times L\) instrument matrix, including the exogenous regressors, and let \(P_Z=Z(Z'Z)^{-1}Z'\) when \(Z\) has full column rank. The 2SLS estimate is

$$ \hat\beta_{2SLS}=(X'P_ZX)^{-1}X'P_Zy. $$

The inverse requires the relevant rank condition: the instruments must provide enough independent variation to identify the coefficients in \(\beta\). For the usual large-sample confidence intervals, also require valid instruments (orthogonal to the structural error), a correctly specified linear model for the target coefficients, and regularity conditions supporting the asymptotic approximation. These conditions do not follow merely from computing 2SLS.

Definition: A two-sided Wald confidence interval for a scalar target \(\theta\), estimated by \(\hat\theta\) with estimated standard error \(SE(\hat\theta)\), is \(\hat\theta\pm q\,SE(\hat\theta)\), where \(q\) is a critical value from the reference distribution used for inference. With a standard normal approximation and confidence level \(1-\alpha\), \(q=z_{1-\alpha/2}\). The interval procedure has approximate \(1-\alpha\) repeated-sampling coverage under its assumptions.

For an individual coefficient, the target is \(\beta_j\), and \(\hat\theta=\hat\beta_j\). More generally, a linear contrast is \(\theta=c'\beta\), where \(c\) is a specified \(k\)-vector of constants. Its estimate is \(c'\hat\beta_{2SLS}\). If \(\widehat V\) estimates the covariance matrix of \(\hat\beta_{2SLS}\), then

$$ SE(c'\hat\beta_{2SLS})=\sqrt{c'\widehat Vc}, \qquad CI_{1-\alpha}(c'\beta) = c'\hat\beta_{2SLS}\pm q\sqrt{c'\widehat Vc}. $$

For a contrast involving more than one coefficient, the off-diagonal covariances in \(\widehat V\) matter. Adding coefficient variances alone is generally incorrect.

Why the Wald Formula Works

The 2SLS estimator can be written as \(\hat\beta_{2SLS}=\beta+(X'P_ZX)^{-1}X'P_Zu\). Under identification, valid instruments, and suitable large-sample conditions, its sampling distribution is approximately normal around \(\beta\), with a covariance matrix estimated using a variance estimator appropriate to the error structure. A linear contrast is also approximately normal because it is a linear transformation of the coefficient vector.

To see how this yields the interval, suppose \(\widehat V\) consistently estimates the sampling covariance matrix \(V\). Then the standardized contrast is approximately standard normal:

$$ \frac{c'\hat\beta_{2SLS}-c'\beta}{\sqrt{c'\widehat Vc}} \ \approx\ N(0,1). $$

A standard normal variable lies between \(-z_{1-\alpha/2}\) and \(z_{1-\alpha/2}\) with probability \(1-\alpha\). Applying those bounds to the standardized contrast and rearranging gives

$$ P\left( c'\hat\beta_{2SLS}-z_{1-\alpha/2}\sqrt{c'\widehat Vc} \le c'\beta \le c'\hat\beta_{2SLS}+z_{1-\alpha/2}\sqrt{c'\widehat Vc} \right)\approx 1-\alpha. $$

This is an approximate large-sample justification, not a guarantee of exact coverage in every sample. In particular, ordinary 2SLS Wald intervals can be unreliable when identification is weak. The usual standard error and critical value do not remove that limitation.

Choose the Covariance Estimator Before Calculating the Interval

The coefficient estimate is the same across the common covariance choices, but the estimated covariance matrix reflects different assumptions about the errors. Write \(\hat u=y-X\hat\beta_{2SLS}\) and \(\hat X=P_ZX\). The following expressions omit optional finite-sample corrections; software may apply such corrections, so the convention should be reported.

Covariance choiceTypical estimated covariance matrixAssumption represented
Homoskedastic\(\hat\sigma^2(X'P_ZX)^{-1}\)Errors have a common variance and are uncorrelated across observations.
Heteroskedasticity-robust\((X'P_ZX)^{-1}\hat X'\operatorname{diag}(\hat u_i^2)\hat X(X'P_ZX)^{-1}\)Errors may have different variances across observations but are uncorrelated across observations.
Cluster-robust\((X'P_ZX)^{-1}\left[\sum_{g=1}^G(\hat X_g'\hat u_g)(\hat X_g'\hat u_g)'\right](X'P_ZX)^{-1}\)Errors may be correlated within a cluster; clusters are treated as independent.

Here \(\hat\sigma^2\) is a residual-based estimate of the common error variance. The subscript \(g\) denotes the observations in cluster \(g\), and \(\hat X_g\) and \(\hat u_g\) are the fitted-regressor matrix and residual vector for that cluster. In practice, cluster covariance estimators often include a finite-sample multiplier. Such a multiplier changes the estimated standard error and therefore the interval endpoints.

The formula for a contrast uses the selected covariance matrix, not a separate standard error for each coefficient. For an individual coefficient, set \(c\) to select that coefficient. For example, \(c=(1,0,\ldots,0)'\) selects the first coefficient; a contrast such as \(\beta_1-\beta_2\) uses \(c=(1,-1,0,\ldots,0)'\).

Worked Example: A Homoskedastic Interval for One Coefficient

Suppose a hypothetical 2SLS analysis estimates a treatment coefficient of \(2.40\) outcome points, with homoskedastic standard error \(0.800\) points. Assume the instruments are valid, the model is identified, and the errors are plausibly homoskedastic and uncorrelated across observations. Using a large-sample 95% normal interval, \(z_{0.975}=1.96\).

The interval is

$$ 2.40\pm1.96(0.800) =2.40\pm1.568 =[0.832,\ 3.968]. $$

Thus, under the stated assumptions and the normal approximation, the interval procedure has approximately 95% coverage for the treatment coefficient over repeated samples. In this hypothetical analysis, the interval ranges from \(0.832\) to \(3.968\) outcome points. It does not mean there is a 95% probability that this fixed coefficient lies in this particular interval.

Intervals for Linear Contrasts

A contrast can express a difference, sum, or other linear combination relevant to the scientific question. Its variance must account for covariance among the estimated coefficients. For two coefficients, the general calculation is

$$ \widehat{\operatorname{Var}}(\hat\beta_1+\hat\beta_2) = \widehat{\operatorname{Var}}(\hat\beta_1) + \widehat{\operatorname{Var}}(\hat\beta_2) + 2\widehat{\operatorname{Cov}}(\hat\beta_1,\hat\beta_2). $$

For a difference, the covariance term is subtracted twice: \(\widehat{\operatorname{Var}}(\hat\beta_1-\hat\beta_2)=\widehat{\operatorname{Var}}(\hat\beta_1)+\widehat{\operatorname{Var}}(\hat\beta_2)-2\widehat{\operatorname{Cov}}(\hat\beta_1,\hat\beta_2)\). A covariance can be positive or negative, so omitting it may either overstate or understate uncertainty.

Worked Example: A Robust Interval for a Linear Contrast

Suppose a hypothetical model has estimates \(\hat\beta_1=1.20\) and \(\hat\beta_2=-0.400\). A heteroskedasticity-robust covariance estimate for this pair is

$$ \widehat V= \begin{pmatrix} 0.090 & -0.018\\ -0.018 & 0.160 \end{pmatrix}. $$

Consider the contrast \(\theta=\beta_1+2\beta_2\), so \(c=(1,2)'\). The estimated contrast is

$$ c'\hat\beta_{2SLS}=1(1.20)+2(-0.400)=0.400. $$

Its estimated variance and standard error are

$$ c'\widehat Vc =0.090+4(0.160)+4(-0.018) =0.658, \qquad SE=\sqrt{0.658}=0.8112. $$

Using the 95% normal critical value gives

$$ 0.400\pm1.96(0.8112) =0.400\pm1.590 =[-1.190,\ 1.990]. $$

The interval is for the specified linear combination, in the units of that combination. It includes zero, so a two-sided 5% Wald test of this contrast being zero would not reject. This conclusion depends on the robust covariance estimate and the large-sample approximation.

Clustered Intervals and Their Conditions

Use cluster-robust uncertainty when observations within a cluster may share shocks—for example, people in the same clinic or observations from the same school. The cluster-robust formula aggregates the fitted-regressor-weighted residual contributions within each cluster before forming the covariance estimate. That aggregation preserves within-cluster dependence rather than treating every observation as independent.

The key asymptotic requirement is generally a sufficiently large number of independent clusters, not merely a large total number of observations. With few clusters, the cluster-robust covariance estimate and normal critical value can give poor coverage. Small-sample corrections or a suitable finite-cluster method may help, but do not make a very small number of clusters automatically adequate.

Worked Example: A Cluster-Robust Interval

Consider a hypothetical scalar-coefficient 2SLS analysis with 40 independent clusters. Let \(A=X'P_ZX=20.0\), and suppose the cluster score contributions are \(S_g=\hat X_g'\hat u_g\), with \(\sum_{g=1}^{40}S_g^2=18.0\). Use the displayed cluster covariance formula without a finite-sample correction. The estimated variance and standard error are

$$ \widehat{\operatorname{Var}}(\hat\beta) =A^{-2}\sum_{g=1}^{40}S_g^2 =\frac{18.0}{20.0^2} =0.0450, \qquad SE=\sqrt{0.0450}=0.2121. $$

If the estimate is \(0.700\) outcome units, a common approximate finite-cluster convention uses a \(t\) critical value with \(G-1=39\) degrees of freedom. With \(t_{0.975,39}\approx2.023\), the interval is

$$ 0.700\pm2.023(0.2121) =0.700\pm0.4291 =[0.2709,\ 1.129]. $$

This interval is conditional on the cluster structure and covariance convention used. The \(t_{39}\) choice is an approximation, not an exact finite-sample result for every 2SLS design. A correction used by software would alter the standard error and could alter the interval endpoints.

Diagnostics, Alternatives, and Common Pitfalls

Before interpreting an interval, check whether its covariance estimator matches the sampling structure. If residual variation differs across observations, the homoskedastic formula may be unsuitable; if observations share within-group shocks, an observation-level robust estimator does not account for that clustering. Also verify that the contrast vector matches the intended question, that the reported standard error is for 2SLS rather than a naive second-stage regression, and that the chosen critical value and any finite-sample correction are stated consistently.

A confidence interval and a Wald test are two presentations of the same large-sample calculation: for a two-sided test at level \(\alpha\), the null value is outside the corresponding \(1-\alpha\) Wald interval exactly when the test rejects, subject to using the same covariance estimator and critical value. An interval is often more informative because it shows both the range of estimates compatible with the data and the precision. Neither presentation repairs invalid instruments or weak identification. When identification is weak, ordinary Wald intervals can be misleading; other inference procedures may be needed.

  • Pitfall: choosing a covariance estimator for convenience. The reasoning “the robust option is always safer” ignores dependence between observations. The correction is to choose an estimator that reflects the plausible error structure and sampling design.
  • Pitfall: treating an interval as a probability statement about a fixed parameter. A 95% interval does not assign a 95% probability to the parameter being inside this realized interval. Its coverage statement describes the long-run performance of the interval procedure under the assumptions.
  • Pitfall: ignoring covariance in a contrast. Adding component standard errors or variances does not generally yield the standard error of a sum or difference. Use \(c'\widehat Vc\), including all covariance terms.
  • Pitfall: assuming many observations solve few-cluster problems. If the number of independent clusters is small, the total observation count alone does not ensure reliable cluster-robust coverage.

Finally, statistical coverage is not a substitute for substantive interpretation. If the model and instrument assumptions support a causal interpretation, state the interval in terms of that causal target. Otherwise, describe it as uncertainty about the specified 2SLS coefficient, without implying that the interval by itself establishes causality.

Check Your Understanding

Work through each question, then compare with the solutions.

  1. A coefficient estimate is \(1.50\) with standard error \(0.250\). Calculate its 95% normal Wald interval.
  2. For \(c=(1,-1)'\), why is the variance of \(c'\hat\beta\) not generally the sum of the two coefficient variances?
  3. When is a cluster-robust covariance estimate appropriate, and what makes a small number of clusters concerning?
  4. Does a 95% confidence interval mean that the fixed coefficient has a 95% probability of lying inside the observed interval?

Solutions. (1) \(1.50\pm1.96(0.250)=1.50\pm0.490=[1.010,1.990]\). (2) The variance is \(\widehat{\operatorname{Var}}(\hat\beta_1)+\widehat{\operatorname{Var}}(\hat\beta_2)-2\widehat{\operatorname{Cov}}(\hat\beta_1,\hat\beta_2)\); the covariance term is generally nonzero. (3) It is appropriate when errors may be correlated within clusters and independent across clusters. With few independent clusters, the covariance estimate and reference distribution may poorly approximate sampling uncertainty. (4) No. The 95% refers to the approximate long-run coverage of the interval procedure over repeated samples under its assumptions.

Clinical Biostats