Alias ArchiveArchive in progress
Archive in progress

Robust standard errors: fixing the inference, not the estimate

Econometrics02 / NOTE

The sandwich estimator repairs OLS standard errors under heteroskedasticity while leaving the coefficients untouched — what it does, the HC0–HC3 variants, and when to reach for weighting instead.

Filed
Field
Research
Edition
EN / Reading copy
Video lesson · 01:35 Repair the inference, not the coefficient

Vera starts with the inferential failure caused by heteroskedasticity, explains why the sandwich estimator changes only the covariance matrix, and distinguishes HC0 through HC3. The lesson establishes the central distinction before the note examines scope and alternatives.

English narration · 16:9Playback starts only when selected; it never autoplays.

The lesson separates point estimation from inferential repair; clustered, serial, and spatial dependence remain part of the full note.

Heteroskedasticity — error variance that changes across observations — does not bias OLS. The coefficients stay unbiased and consistent; what breaks is the variance formula, so the conventional standard errors, t-statistics, and confidence intervals are wrong. Heteroskedasticity-robust (White / Eicker–Huber–White, or “sandwich”) standard errors fix exactly that, and only that: the point estimates are unchanged.

The logic is in the name. The true variance is a sandwich,

Var(β̂) = (X'X)⁻¹ (X'ΩX) (X'X)⁻¹,    Ω = diag(σ_i²)

We can’t observe each σ_i², but the squared residuals ε̂_i² are consistent building blocks for the “meat” in the middle:

Var̂(β̂) = (X'X)⁻¹ ( Σ_i w_i·ε̂_i²·x_i x_i' ) (X'X)⁻¹

The HC variants differ only in the small-sample weight w_i:

  • HC0 (White): w_i = 1.
  • HC1: w_i = n/(n−k) — a degrees-of-freedom scaling.
  • HC2: w_i = 1/(1−h_ii), using the leverage h_ii.
  • HC3: w_i = 1/(1−h_ii)² — approximates a jackknife; best in small samples, and a sensible default.

Where this sits relative to its neighbours:

  • Versus weighted least squares: robust SE keeps the (inefficient) OLS estimates and only fixes inference; WLS instead changes the estimates to regain efficiency when you know the variance structure. Robust SE is what you use when heteroskedasticity is a nuisance and its form is unknown; WLS when the form is known and efficiency is the goal.
  • It buys you nothing against bias. Exogeneity and a correct mean model are still required — omitted variables and endogeneity are untouched.
  • The i.i.d.-robust sandwich also assumes errors are independent. Under clustering use cluster-robust SE; under serial correlation, HAC; under spatial correlation, a spatial-error model or spatially-robust inference.

Common slips: believing robust SE repairs bias (it doesn’t); using HC0/HC1 in small samples, where they under-cover (prefer HC3); and applying i.i.d.-robust errors when the real problem is clustered or spatially correlated dependence.