Skip to content
Heteroskedasticityintermediate

Heteroskedasticity-Robust Standard Errors

Heteroskedasticity-robust standard errors (White, also called Huber-Eicker or sandwich SEs) replace the squared error σ2\sigma^2 in the variance formula with each observation’s squared residual u^i2\hat{u}_i^2. The result is valid whatever the form of heteroskedasticity, and it does not require you to know or model the variance function. Because OLS coefficients are already unbiased and consistent under heteroskedasticity, swapping in robust SEs repairs the one thing that was broken, the inference, while keeping the same estimates. In Stata this is one option, `regress y x, robust`. They are the modern default, with the caveat that their justification is large-sample.

Try it yourself

Classical vs robust standard errors

The error spread grows with x (heteroskedasticity), yet the OLS slope stays unbiased. What breaks is the standard error: the classical SE is invalid here, while the robust (HC1) SE — Stata’s , robust — is asymptotically valid. The point estimate is fixed by construction, so only the SEs move.

SE(b₁)classical 0.158vsrobust 0.2141.36×
159141814710xyOLS fit (slope fixed by construction)
95% confidence interval for the slope b₁ (same centre, different width)
0.270.540.801.061.33Classical CIRobust (HC1) CIb₁ = 0.80
Slope b₁ (fixed by construction) 0.80Robust ÷ classical SE 1.36×
Heteroskedasticity6.0
The slope estimate is 0.80 at every setting, so heteroskedasticity has not biased it. But the classical SE (0.158) is invalid here, while the robust SE (0.214) is asymptotically valid. In this design robust is 1.36× the classical, so the classical confidence interval is too narrow and its t-test overstates significance.
Robust here is HC1 (finite-sample adjusted), the same estimator as Stata’s regress y x, robust. It is asymptotically valid, not exactly correct, and need not be larger in general — it simply happens to be larger in this rising-variance design.
The slope point estimate is 0.80, fixed by construction. The classical standard error is 0.158 and the heteroskedasticity-robust standard error is 0.214, a ratio of 1.36 to one. In this design the robust standard error is larger, so the classical confidence interval is too narrow.

Why it matters

The default standard error trusts a promise the data may not keep, that every observation is equally noisy. Robust standard errors drop that promise and instead let each point speak for its own noise, using how far it actually missed the line, u^i2\hat{u}_i^2, as the local measure of variance. Points in the noisy region get more weight in the uncertainty calculation, points in the tight region get less. You change nothing about the fitted line, you only let the standard errors tell the truth about how precise that line really is.

Formulas

White (sandwich) variance estimator, simple regression slope
Var^(β^1)=i=1n(xixˉ)2u^i2[i=1n(xixˉ)2]2\widehat{\mathrm{Var}}(\hat{\beta}_1) = \frac{\sum_{i=1}^{n} (x_i - \bar{x})^2 \, \hat{u}_i^2}{\left[\sum_{i=1}^{n} (x_i - \bar{x})^2\right]^2}
The robust SE is the square root of this. It plugs the observed squared residual u^i2\hat{u}_i^2 in place of a common σ2\sigma^2, so it stays valid for any pattern of σi2\sigma_i^2.
Robust t statistic
t=β^j0serobust(β^j)t = \frac{\hat{\beta}_j - 0}{\mathrm{se}_{\text{robust}}(\hat{\beta}_j)}
Same form as the usual tt, but the denominator is the robust SE. Its reference distribution is justified asymptotically, so it is most reliable in large samples.

Worked examples

Scenario

Your wage regression shows a clear funnel in the residual plot and you want valid inference without committing to a model for the error variance.

Solution

Estimate `regress lwage educ exper tenure, robust` (or the equivalent `vce(robust)`). The coefficients are identical to plain OLS; only the standard error column, and therefore the tt statistics and the 95% confidence intervals, change. Report the robust SEs. If a coefficient is significant under robust SEs, that conclusion does not depend on assuming constant variance.

Note`regress y x, robust` and `regress y x, vce(robust)` are equivalent in Stata. The coefficient estimates never move; only the SE-based statistics do.

Common mistakes

  • Robust standard errors change the coefficient estimates. They do not. OLS produces the same β^j\hat{\beta}_j; the `robust` option only recomputes the standard errors and everything derived from them.
  • Robust standard errors fix bias caused by an omitted variable or a wrong functional form. They address only heteroskedasticity in the SEs. If the conditional mean is misspecified, the coefficients are biased and robust SEs cannot rescue them.
  • Robust standard errors are always larger than the usual ones. They can be larger or smaller, because they are a reweighting of the residual information, not an inflation factor.
  • Robust standard errors are exact in any sample size. Their validity is a large-sample (asymptotic) result, so in very small samples they can be unreliable and a correction or caution is warranted.

Revision bullets

  • Replace σ2\sigma^2 with u^i2\hat{u}_i^2 in the variance formula (sandwich form)
  • Valid for any form of heteroskedasticity; no variance model needed
  • Coefficients unchanged, only SEs, tt, FF, and CIs are recomputed
  • Stata: `regress y x, robust` or `vce(robust)`
  • Justification is large-sample, so prefer it with a decent nn

Quick check

Compared with default OLS, adding the `robust` option in Stata changes:

A key advantage of heteroskedasticity-robust standard errors is that they:

Why are robust standard errors often called the modern default?

Connected topics

Sources

  1. Wooldridge (2019), §8.2
    Wooldridge, Jeffrey M. Introductory Econometrics: A Modern Approach, 7th ed., Section 8.2, Heteroskedasticity-Robust Inference after OLS Estimation. Cengage, 2019.
    Derives the White heteroskedasticity-robust standard errors and the robust t and F statistics, and notes their large-sample justification.
  2. White, Halbert. A Heteroskedasticity-Consistent Covariance Matrix Estimator and a Direct Test for Heteroskedasticity. Econometrica 48(4): 817-838, 1980.
    Original derivation of the heteroskedasticity-consistent (sandwich) covariance matrix estimator that underlies Stata’s robust option.
How to cite this page
Dr. Phil's Quant Lab. (2026). Heteroskedasticity-Robust Standard Errors. Derivatives Atlas. https://phucnguyenvan.com/concept/efm-robust-se