Heteroskedasticity-consistent standard errors

Revision as of 13:03, 20 August 2026 by WikiSysopIG (talk | contribs) (Created page with "'''Heteroskedasticity-consistent standard errors''' ('''HC standard errors''') are standard-error estimators used in regression analysis to provide inference that is robust to heteroskedasticity of the regression errors. In an ordinary least squares (OLS) regression: <math> \mathbf{y} = \mathbf{X}\boldsymbol{\beta} + \boldsymbol{\epsilon} </math> the conventional OLS covariance matrix assume...")
(diff) ← Older revision | Latest revision (diff) | Newer revision β†’ (diff)

Heteroskedasticity-consistent standard errors (HC standard errors) are standard-error estimators used in regression analysis to provide inference that is robust to heteroskedasticity of the regression errors.

In an ordinary least squares (OLS) regression:

𝐲=π—πœ·+𝝐

the conventional OLS covariance matrix assumes that the conditional variance of the error term is constant:

Var⁑(πβˆ£π—)=Οƒ2𝐈

Under heteroskedasticity, this assumption may not hold:

Var⁑(πβˆ£π—)=πœ΄β‰ Οƒ2𝐈

HC estimators replace the conventional homoskedastic covariance estimate with an estimator that allows the error variance to differ across observations.

Basic formulation

The general heteroskedasticity-robust covariance estimator has the sandwich form:

Var^(πœ·Μ‚)=(𝐗𝖳𝐗)βˆ’1π—π–³πœ΄Μ‚π—(𝐗𝖳𝐗)βˆ’1

where:

  • πœ·Μ‚ = OLS coefficient estimates;
  • 𝐗 = design matrix;
  • πœ΄Μ‚ = estimated covariance matrix of the regression errors;
  • Var^(πœ·Μ‚) = estimated covariance matrix of the OLS coefficients.

The resulting standard error for coefficient j is:

SEHC(Ξ²Μ‚j)=[Var^(πœ·Μ‚)]jj

HC0 estimator

The original heteroskedasticity-consistent estimator, commonly called HC0, uses the squared OLS residuals to estimate observation-specific error variances.

The covariance estimator is:

Var^HC0(πœ·Μ‚)=(𝐗𝖳𝐗)βˆ’1(𝐗𝖳𝐃̂𝐗)(𝐗𝖳𝐗)βˆ’1

where:

𝐃̂=diag⁑(e12,e22,…,en2)

and ei is the OLS residual for observation i.

Equivalently:

Var^HC0(πœ·Μ‚)=(𝐗𝖳𝐗)βˆ’1(βˆ‘i=1nei2𝐱i𝐱i𝖳)(𝐗𝖳𝐗)βˆ’1

where 𝐱i is the vector of explanatory variables for observation i.

HC1 estimator

HC1 applies a degrees-of-freedom adjustment to HC0:

Var^HC1=nnβˆ’kVar^HC0

where:

  • n = number of observations;
  • k = number of estimated regression coefficients, including the intercept where applicable.

HC1 is closely related to the conventional finite-sample degrees-of-freedom adjustment used in OLS variance estimation.

HC2 and HC3 estimators

HC2 and HC3 adjust the residual contribution using the leverage of each observation.

The leverage of observation i is:

hii=𝐱i𝖳(𝐗𝖳𝐗)βˆ’1𝐱i

The HC2 residual adjustment is:

ei21βˆ’hii

The corresponding estimator can be written as:

Var^HC2=(𝐗𝖳𝐗)βˆ’1(βˆ‘i=1nei21βˆ’hii𝐱i𝐱i𝖳)(𝐗𝖳𝐗)βˆ’1

HC3 applies a stronger leverage adjustment:

ei2(1βˆ’hii)2

giving:

Var^HC3=(𝐗𝖳𝐗)βˆ’1(βˆ‘i=1nei2(1βˆ’hii)2𝐱i𝐱i𝖳)(𝐗𝖳𝐗)βˆ’1

HC3 is often used when observations may have substantial leverage or when the sample is relatively small.

HC4 and later estimators

Additional estimators, including HC4, HC4m, and HC5, apply alternative adjustments for observations with high leverage.

These estimators are designed to reduce the influence of observations whose leverage may cause the HC covariance estimator to underestimate sampling variability.

The exact adjustment differs among the estimators.

Purpose

HC standard errors are designed primarily to improve statistical inference when the OLS error variance is not constant.

They can be used to calculate:

  • robust standard errors;
  • confidence intervals;
  • t-statistics;
  • hypothesis tests.

The OLS coefficient estimates themselves are generally unchanged when conventional standard errors are replaced with HC standard errors.

Thus:

OLS coefficients→unchanged

while:

Estimated standard errors→adjusted

and consequently:

t-statistics and confidence intervals→may change

Example

Suppose an OLS regression estimates:

Yi=Ξ²0+Ξ²1Xi+Ο΅i

and the estimated coefficient is:

Ξ²Μ‚1=0.80

Suppose the conventional standard error is:

SE⁑(Ξ²Μ‚1)=0.20

The conventional t-statistic for testing:

H0:Ξ²1=0

is:

t=0.800.20=4.00

If heteroskedasticity-consistent estimation produces:

SEHC3(Ξ²Μ‚1)=0.30

then the coefficient remains:

Ξ²Μ‚1=0.80

but the robust t-statistic becomes:

tHC3=0.800.30β‰ˆ2.67

Thus, robust standard errors can materially affect statistical inference without changing the estimated regression coefficient.

Limitations

Heteroskedasticity-consistent standard errors do not solve every regression problem.

They do not, by themselves, correct for:

HC standard errors are therefore a correction to the estimated covariance matrix rather than a replacement for appropriate model specification.

Heteroskedasticity versus autocorrelation

HC standard errors are primarily designed for heteroskedasticity where observations are otherwise appropriately treated as independent.

When regression errors are both heteroskedastic and serially correlated, a covariance estimator designed to account for both features may be required, such as a suitable Newey–West estimator in applicable time-series settings.

The distinction can be summarized as:

HC standard errors→Heteroskedasticity

HAC standard errors→Heteroskedasticity + Autocorrelation

See also