Tutorials › Propensity Score Matching and Instrumental Variables › Finite-Sample Corrections for 2SLS Variances

Two-Stage Least Squares · Tutorial 495 of 699

Finite-Sample Corrections for 2SLS Variances

Learn how finite-sample correction factors change 2SLS covariance estimates and standard errors, and how to distinguish observation-count adjustments from cluster-count adjustments.

Advanced 11 min read

What You'll Learn

  • Define HC0 and cluster-robust 2SLS covariance estimates using instrument-based scores.
  • Apply the common HC1 observation-count correction to a heteroskedasticity-robust covariance estimate.
  • Compute and compare common cluster-robust small-sample multipliers.
  • Distinguish covariance scaling from the degrees of freedom used for reference distributions.
  • Diagnose when a scalar correction is inadequate, especially with few or highly unbalanced clusters.
  • Explain why finite-sample adjustments do not repair weak instruments or invalid instruments.

Why Finite-Sample Corrections Matter

A 2SLS covariance estimator is often built from estimated residuals and empirical score contributions. In a finite sample, those estimated contributions can understate variability, particularly when the sample is small relative to the number of fitted coefficients or when the data contain only a modest number of independent clusters. A finite-sample correction multiplies a covariance estimate by a specified factor; its standard errors then change by the square root of that factor.

These adjustments are conventions, not a universal finite-sample repair. Their usefulness depends on the sampling structure and the covariance estimator to which they are applied. In particular, an observation-count correction and a cluster-count correction answer different concerns, and software may implement different combinations of them.

2SLS Covariance Estimates and Their Ingredients

Let \(y\) be the \(n\)-vector of outcomes, \(X\) the \(n\times k\) structural regressor matrix, and \(Z\) the \(n\times q\) instrument matrix. The columns of \(X\) include all included exogenous regressors and endogenous regressors; the columns of \(Z\) include the excluded instruments and included exogenous regressors. Assume the matrices have the ranks needed to compute 2SLS, and write \(P_Z=Z(Z'Z)^{-1}Z'\). The 2SLS coefficient estimate is \(\hat\beta=(X'P_ZX)^{-1}X'P_Zy\), with residuals \(\hat u=y-X\hat\beta\). This tutorial concerns covariance estimates for that coefficient estimate, not a new coefficient estimator.

The heteroskedasticity-robust estimator often called HC0 uses an observation-level instrument score. For observation \(i\), let \(z_i\) be the \(q\)-vector of instruments and \(\hat u_i\) its residual. Define \(B=(X'Z(Z'Z)^{-1}Z'X)^{-1}X'Z(Z'Z)^{-1}\). Then the HC0 covariance estimate is \(B[\sum_{i=1}^n z_i z_i'\hat u_i^2]B'\). This is a “sandwich”: \(B\) maps the instrument-score variation into coefficient units, while the sum in brackets estimates variation in the scores. It allows the error variance to differ across observations, under the relevant instrument exogeneity and sampling assumptions.

If observations are grouped into \(G\) independent clusters, arbitrary dependence within a cluster is allowed by aggregating its scores before forming the meat. For cluster \(g\), define \(s_g=\sum_{i\in g}z_i\hat u_i\). The uncorrected cluster-robust covariance estimate, commonly called CR0, is \(B[\sum_{g=1}^G s_gs_g']B'\). The key sampling condition is independence across clusters, not independence of observations within a cluster.

Definition: A finite-sample correction is a stated adjustment to a covariance estimate, commonly a scalar multiplier \(c\). The corrected covariance estimate is \(c\widehat V\), and the corresponding standard error for a coefficient is multiplied by \(\sqrt{c}\). The correction changes estimated uncertainty, not the 2SLS coefficient estimate.

Observation-Count Corrections

A common heteroskedasticity-robust adjustment is HC1. With \(k\) structural regressors, including an intercept if present, its conventional form is \(c_{\mathrm{HC1}}=n/(n-k)\), so \(\widehat V_{\mathrm{HC1}}=[n/(n-k)]\widehat V_{\mathrm{HC0}}\), provided \(n>k\). Some implementations or descriptions use other finite-sample factors, so the multiplier should be reported rather than inferred from a label alone.

The intuition comes from degrees of freedom: fitting \(k\) coefficients uses information, leaving fewer than \(n\) residual degrees of freedom. In the ordinary homoskedastic linear model, the residual sum of squares divided by \(n-k\) estimates the error variance without bias under the model assumptions. That result motivates a degrees-of-freedom adjustment, but it does not prove that multiplying every 2SLS HC0 covariance estimate by \(n/(n-k)\) makes it exactly unbiased in finite samples. HC1 is a practical convention for 2SLS robust covariance estimates.

$$ \widehat V_{\mathrm{HC1}}=\frac{n}{n-k}\widehat V_{\mathrm{HC0}}, \qquad SE_{\mathrm{HC1}}(\hat\beta_j) =\sqrt{\frac{n}{n-k}}\,SE_{\mathrm{HC0}}(\hat\beta_j) $$

Worked Example: Applying HC1 to a Robust 2SLS Standard Error

Suppose a hypothetical cross-sectional analysis has \(n=120\) observations and \(k=5\) structural regressors, counting the intercept. Assume the instruments and regressors meet the rank requirements, and suppose the reported HC0 variance estimate for one coefficient is \(0.0400\), in squared outcome-units per squared unit of that regressor. The observations are treated as independent, and HC0 is the appropriate starting covariance estimate for the assumed heteroskedasticity.

The HC1 multiplier is \(120/(120-5)=120/115=1.04348\). Therefore the corrected variance is \(1.04348(0.0400)=0.041739\). The uncorrected standard error is \(\sqrt{0.0400}=0.2000\); the corrected standard error is \(\sqrt{0.041739}=0.2043\), in outcome-units per regressor-unit.

The correction raises the variance by about 4.35% and the standard error by about 2.15%. The coefficient estimate is unchanged. This calculation does not establish that the instruments are valid or strong; those are separate requirements for interpreting 2SLS inference.

Cluster-Count Corrections

For clustered data, the number of independent clusters \(G\) matters directly. A widely used CR1 convention multiplies CR0 by both a cluster-count factor and an observation-count factor: \(c_{\mathrm{CR1}}=[G/(G-1)][(n-1)/(n-k)]\), where \(G>1\) and \(n>k\). Thus \(\widehat V_{\mathrm{CR1}}=c_{\mathrm{CR1}}\widehat V_{\mathrm{CR0}}\). The factor \(G/(G-1)\) reflects that the cluster-level scores are estimated from a finite number of independent groups. The factor \((n-1)/(n-k)\) is an observation-level adjustment.

There is not one universal meaning of “cluster correction.” A common alternative applies only \(G/(G-1)\) to CR0. Some software uses a correction based on \(G\) and \(k\) that differs from the displayed CR1 factor. Other estimators, such as leverage-adjusted cluster corrections, are not simply a scalar multiple of CR0. For reproducibility, identify the covariance estimator and give the actual correction or software convention.

Worked Example: Comparing Two Cluster Corrections

Suppose a hypothetical analysis has \(n=240\) observations in \(G=12\) independent clinics and \(k=6\) structural regressors, including the intercept. Assume the clinics are independent, observations may be dependent within a clinic, and the reported CR0 variance estimate for a coefficient is \(0.0256\), in squared coefficient units.

Under the CR1 convention above, the multiplier is \(c_{\mathrm{CR1}}=(12/11)(239/234)=1.11422\). The corrected variance is \(1.11422(0.0256)=0.028523\), giving a standard error of \(\sqrt{0.028523}=0.1689\). The CR0 standard error was \(\sqrt{0.0256}=0.1600\).

Under the cluster-only convention, the multiplier is \(12/11=1.09091\). The adjusted variance is \(1.09091(0.0256)=0.027927\), and the standard error is \(\sqrt{0.027927}=0.1671\). The two results differ because the conventions use different multipliers, not because they estimate different coefficients. Both calculations require the stated cluster structure; neither makes the 12 clinics more numerous or independent than they are.

What the Corrections Do—and Do Not—Justify

A scalar correction has a simple algebraic consequence. For any positive covariance estimate \(\widehat V\) and \(c>0\), a coefficient’s corrected variance is \(c\widehat V_{jj}\), so its standard error is \(\sqrt{c\widehat V_{jj}}=\sqrt{c}\sqrt{\widehat V_{jj}}\). Every covariance entry is multiplied by the same \(c\), so correlations implied by the covariance matrix do not change. The coefficient estimate and residuals also do not change.

The following example shows why a cluster-count multiplier should not be mistaken for a solution to the few-cluster problem. The assumptions needed for CR0 include independent clusters and an appropriate 2SLS instrument setup; the correction itself does not verify either assumption.

Worked Example: A Large Relative Adjustment With Few Clusters

Consider hypothetical data with \(n=48\), \(G=8\) independent clusters, and \(k=4\) structural regressors. Suppose CR0 gives a coefficient variance estimate of \(0.0900\), in squared coefficient units. For CR1, \(c=(8/7)(47/44)=1.22078\). Thus the adjusted variance is \(1.22078(0.0900)=0.109870\), and the adjusted standard error is \(\sqrt{0.109870}=0.3315\), compared with the CR0 standard error of \(0.3000\).

The cluster-only convention instead gives \(c=8/7=1.14286\), adjusted variance \(1.14286(0.0900)=0.102857\), and standard error \(0.3207\). These calculations show that the choice of correction has a noticeable effect. They do not show that either corrected standard error has an accurate finite-sample distribution with only eight clusters. A scalar multiplier cannot fully represent the consequences of high cluster leverage, substantial cluster-size imbalance, or a small number of independent sampling units.

Covariance scaling and reference-distribution degrees of freedom are distinct choices. For cluster-based inference, a commonly used reference degrees of freedom is \(G-1\), but applying CR1 does not itself impose that reference distribution. In the example with eight clusters, \(G-1=7\); that choice concerns how a statistic is referenced, not the arithmetic used to multiply CR0. State both choices when reporting inferential results. The exact inference procedure is a separate issue from the covariance correction.

Diagnostics, Alternatives, and Limitations

Before applying a correction, check that the starting covariance estimator matches the dependence structure. HC0 treats observations as independent sampling units while allowing heteroskedasticity. CR0 allows dependence within clusters but requires independence across clusters. A correction cannot compensate for clustering at the wrong level, omitted dependence across clusters, invalid instruments, or weak identification.

Check the dimensions and inputs as well: \(k\) should count structural regressors, not instruments; \(G\) should count independent clusters; \(n>k\) and \(G>1\) are required for the displayed factors. Confirm that the covariance is positive semidefinite up to numerical tolerance and that residuals and cluster assignments were used consistently. Very unequal cluster sizes or a few clusters that dominate the instrument scores are warnings that a scalar correction may be inadequate.

The alternatives address different features of the problem. HC1 is a simple observation-level degrees-of-freedom adjustment to HC0. CR1 additionally accounts for a finite number of clusters through a scalar factor. Leverage-adjusted approaches such as CR2 alter cluster contributions rather than merely rescaling the entire covariance matrix and may pair inference with an estimated degrees-of-freedom calculation. Conventional homoskedastic 2SLS standard errors use a common error variance assumption; they are not a substitute for robust or clustered estimates when that assumption is inappropriate. None of these covariance choices changes the 2SLS point estimate.

Common pitfall: “There are six instruments, so I should use \(n/(n-6)\) as the HC1 factor.” This confuses instrument count with the number of structural coefficients. In the displayed convention, \(k\) is the number of columns of \(X\), including included exogenous regressors and the intercept; \(q\), the number of columns of \(Z\), is not substituted for \(k\). For clustered data, also report \(G\) and specify whether the factor includes \(G/(G-1)\), \((n-1)/(n-k)\), or another convention.

A Practical Reporting Sequence

1
Choose the dependence structure.
Decide whether the covariance estimate should allow heteroskedasticity across independent observations or dependence within independent clusters.
2
Identify the uncorrected estimator.
State HC0 or CR0, and verify the residuals, instrument scores, and sampling units used to calculate it.
3
Write the correction explicitly.
Give \(n\), \(k\), and, when clustered, \(G\), then state the multiplier and corrected standard error.
4
Assess remaining limitations.
Consider cluster count, imbalance, leverage, and the validity and strength of the instruments; a degrees-of-freedom multiplier does not resolve these issues.

The central practical lesson is to treat a finite-sample correction as part of the covariance-estimation specification, not as an automatic guarantee of accurate inference. Two analyses can report the same 2SLS coefficients and different standard errors because they use different correction conventions. Transparent reporting makes that difference interpretable and reproducible.

Check Your Understanding

Answer each question, then compare with the brief solutions.

  1. An HC0 coefficient variance is \(0.0625\), with \(n=100\) and \(k=5\). Under HC1, what are the adjusted variance and standard error?
  2. Why is the number of instruments not substituted for \(k\) in the displayed HC1 formula?
  3. For \(n=90\), \(k=6\), and \(G=10\), write the CR1 multiplier. What information does \(G/(G-1)\) use that HC1 does not?
  4. Does multiplying CR0 by a cluster correction establish that the instruments are valid? Explain.

Solutions. (1) The multiplier is \(100/(100-5)=100/95=1.05263\). The adjusted variance is \(1.05263(0.0625)=0.065789\), and the standard error is \(\sqrt{0.065789}=0.2565\); the unadjusted standard error was \(0.2500\). (2) The formula uses \(k\), the number of structural regressors in \(X\), including the intercept; instruments are columns of \(Z\), and their count \(q\) is a different quantity. (3) The multiplier is \((10/9)(89/84)=1.17725\). The cluster factor uses the number of independent clusters, while HC1 uses an observation-count adjustment. (4) No. The correction only rescales a covariance estimate. Instrument validity is a separate identifying assumption and is not tested or guaranteed by the multiplier.

Clinical Biostats