- Introduced by
- Eicker; Huber; White (1980); MacKinnon & White (1985)
- Year
- 1980
- Type
- Robust covariance estimator for linear regression
What does it do?
Heteroscedasticity-robust standard errors are a correction to the covariance matrix of an OLS regression that gives asymptotically valid inference when the error variance is not constant.
Halbert White's 1980 estimator (HC0) is the starting point. MacKinnon and White (1985) proposed finite-sample variants, labelled HC1 to HC3, and HC4 is a further variant that targets high-leverage points. The coefficient estimates are left unchanged; only the standard errors, and hence the t and F tests, are recomputed.
The intuition behind the method
Ordinary OLS standard errors assume every observation has the same error variance. When that assumption fails, the coefficients are still fine but their reported precision is wrong, so significance tests mislead you. Robust standard errors fix this by letting each observation's own squared residual speak for how noisy it is, instead of forcing a single shared variance. The result is a 'sandwich' formula that sandwiches the observed scatter of the residuals between two copies of the usual OLS bread, producing standard errors that remain asymptotically valid even when the noise grows or shrinks across the data.
History
Eicker and Huber are credited with earlier sandwich-type covariance ideas. Halbert White's 1980 Econometrica paper introduced a heteroskedasticity-consistent covariance matrix estimator that does not require a model of the heteroskedasticity, and also gave a direct test based on comparing the usual and the robust covariance estimators. MacKinnon and White (1985) proposed finite-sample modifications, labelled HC1 to HC3. HC4 is a later variant in the same family of estimators.
When to use it
Use HC standard errors after fitting an OLS regression on a continuous outcome when you suspect non-constant error variance. They are commonly reported by default for cross-sectional OLS, and a Breusch-Pagan test on the residuals can support that choice. They suit cross-sectional data where the spread of residuals differs across observations. Panel or other repeated-measures data usually show within-unit correlation, which HC errors do not correct; for those, use cluster-robust standard errors, for example clustering at the country level in panel studies. Do not rely on HC errors alone when errors are correlated within clusters, or when the sample is small or a few high-leverage points dominate; in those cases HC3 or HC4, or a wild bootstrap, are the safer options.
Limitations and considerations
- In small samples the HC standard errors can be unreliable, so HC3 or a wild bootstrap is the safer choice.
- High-leverage points distort HC0 and HC1, so HC3 or HC4 is preferred when influential observations are present.
- They correct only for heteroscedasticity, not for autocorrelation or within-cluster dependence, which need other robust estimators.
Source conditions do not replace independent scientific review or validation by an analysis engine.
Strengths
- Gives asymptotically valid standard errors and t and F tests under heteroscedasticity without specifying the form of the variance.
- Leaves the OLS point estimates unchanged, so coefficient interpretation is identical to ordinary OLS.
- Requires no re-estimation: the same OLS fit is reused and only the covariance matrix is recomputed, with HC1 to HC4 offering finite-sample refinements.
Applications
- Reporting t and F tests for OLS regressions on cross-sectional data where residual spread differs across groups of observations.
- Adding robust standard errors to a regression whose heteroscedasticity test flags non-constant variance, without changing the coefficient estimates.
- Comparing classical and robust standard errors as a sensitivity check on significance conclusions.
How it works
How it works
You start from a fitted OLS model where the outcome y is a linear function of the predictors X plus an error, but unlike classical OLS the error variance σᵢ² is allowed to differ from observation to observation. The coefficients β̂ are exactly the usual least-squares estimates; only the assumption about the error variance is relaxed.
Formula
y = X\beta + \varepsilon, \quad \operatorname{Var}(\varepsilon_i \mid x_i) = \sigma_i^2The covariance of β̂ is re-estimated with the sandwich formula (XᵀX)⁻¹ [ Σ êᵢ² xᵢxᵢᵀ ] (XᵀX)⁻¹, where êᵢ are the OLS residuals. This is the HC0 form, in which the raw squared residuals enter the middle term without any finite-sample adjustment. HC1 to HC4 keep the same sandwich structure but modify the squared residuals with degrees-of-freedom and leverage-based corrections, which are intended to improve accuracy in smaller samples and when high-leverage points are present. The square roots of the diagonal elements of the estimated covariance matrix are the robust standard errors used in t and F tests.
Formula
\widehat{\operatorname{Var}}(\hat{\beta}) = (X^{\top}X)^{-1} \left( \sum_i \hat{e}_i^2\, x_i x_i^{\top} \right) (X^{\top}X)^{-1}Common pitfalls
- Reporting plain OLS standard errors when a Breusch-Pagan test flags heteroscedasticity, which leaves the inference invalid.
- Defaulting to HC0 with high-leverage observations or small samples instead of HC3 or HC4.
- Using HC standard errors when the real problem is clustered or autocorrelated errors; they will not fix that.
- Assuming robust standard errors repair biased coefficients; they correct the standard errors, not the point estimates.
Frequently asked questions
Do robust standard errors change my coefficients?
No. The point estimates β̂ are exactly the ordinary least-squares values. Only the covariance matrix, and therefore the standard errors, t statistics, and p values, is recomputed to be valid under heteroscedasticity.
Which HC variant should I use?
HC0 is White's original estimator. HC1 applies a degrees-of-freedom correction, HC2 and HC3 adjust for leverage, and HC4 is aimed at high-leverage points. HC3 is often chosen in smaller samples, but no variant is uniformly best; when influential observations drive the results, HC4 or a wild bootstrap are alternatives to consider.
How do I know I need robust standard errors?
Fit OLS and examine the residuals. A Breusch-Pagan or White test that indicates non-constant error variance is supporting evidence that classical standard errors may be misleading. A non-significant test does not establish constant variance, so many analysts report HC standard errors routinely for cross-sectional OLS rather than relying on a pretest.
Can robust standard errors handle clustered data?
Not on their own. HC standard errors correct for heteroscedasticity but assume observations are otherwise independent. When errors are correlated within groups (schools, firms, regions), use cluster-robust standard errors instead.
Related methods
Sources
White, H. (1980). A Heteroskedasticity-Consistent Covariance Matrix Estimator and a Direct Test for Heteroskedasticity. Econometrica, 48(4), 817-838.
Open DOI referenceMacKinnon, J. G. & White, H. (1985). Some Heteroskedasticity-Consistent Covariance Matrix Estimators with Improved Finite Sample Properties. Journal of Econometrics, 29(3), 305-325.
Open DOI referenceEconometrics in Theory and Practice: Analysis of Cross Section, Time Series and Panel Data with Stata 15.1 (2019), p. 114
Introductory Econometrics for Finance, 2nd edition, p. 139