Heteroskedasticity leads to inaccurate standard errors in linear regression, but can be corrected using robust / heteroskedasticity consistent corrected (HCC) standard errors.

Recall, the matrix form of the regression equation:

**y = XB + ϵ**

with the estimator

**b = (X’X)**substituting for^{-1}X’y**y**we get**b = (X’X)**

^{-1}X’ (XB + ϵ)**= (X’X)**

^{-1}[X’XB +X’ ϵ]**= (X’X)**

^{-1}X’XB +(X’X)^{-1}X’ ϵ**= B +(X’X)**

^{-1}X’ ϵ**VAR(b) = E[(b-B)(b-B)]**

From the above we know:

**b = B +(X’X)**^{-1}X’ ϵ**(b-B) = B +(X’X)**

^{-1}X’ ϵ - B**= (X’X)**

^{-1}X’ ϵTherefore

**VAR(b)=****E[(b-B)(b-B)] = E[((X’X)**^{-1}X’ ϵ)( (X’X)^{-1}X’ ϵ)]**=E[(X’X)**

^{-1}X’ ϵ ϵ’X(X’X)^{-1}]**=(X’X)**

^{-1}X’E[ϵ ϵ’]X(X’X)^{-1}Let

**E[ϵ ϵ’] = Φ**then we have**VAR(b) = (X’X)**‘general form’^{-1}X’ Φ X(X’X)^{-1}If

**Φ = σ**then^{2}I**VAR(b) = (X’X)**=^{-1}X’ σ^{2}I X(X’X)^{-1}**σ**^{2}(X’X)^{-1}^{ }‘case of homoskedasticity’For heteroskedasticity corrected standard errors

**VAR(b) =****N/(N-k) (X’X)**

^{-1}X’ Φ̂ X(X’X)^{-1}where Φ̂ = diag(e_{i}^{2})**References:**

Greene, Econometric Analysis. 1990

Using Heteroskedasticity Consistent Standard Errors in the Linear Regression Model. J.Scott Long and Laurie H. Ervin. The American Statistician Vol. 54 No 3 (Aug 2000) pp. 217-224