# Difference between HCCME and WLS estimator

I have a question concerning heteroscedasticity. Is there any difference between correcting for heteroscedasticity with the heteroscedastic consistent covariance matrix estimator (e.g. $HC_0$ of White (1980) or similar types) and estimating a model with weighted least squares?

In both ways I put some weight on each diagonal element in the variance-covariance matrix to control for the underlying heteroscedasticity. Either I transform my model to

$$y_t/\omega_t = \beta_0(1/\omega_t) + \beta_1(x_t/\omega_t) + u_t/\omega_t$$

where $$u_t^* = u_t/\omega_t \sim N(0,1)$$

or I just estimate the normal model $$y_t = \beta_0 + \beta_1 x_t + u_t$$ and correct for heteroscedasticity in the sandwich form variance-covariance matrix $$VCV(\hat{\beta})=(X'X)^{-1}X'\Omega X(X'X)^{-1}$$

but basically both estimation methods apply the same technique in correcting for heteroscedasticity, or I am overlooking something?

You do overlook that WLS produces a different point estimator, that is $$\hat{\beta}_{WLS}=(X'\Omega^{-1}X)^{-1}X'\Omega^{-1}y$$ whereas HCCME continues to estimate $\beta$ by OLS, i.e., $$\hat{\beta}=(X'X)^{-1}X'y$$ but uses another estimate of the variance-covariance matrix of $\hat{\beta}$ as the variance of OLS is different when there is heteroskedasticity.

That is what is meant by a "robust" strategy, in that you use the same point estimator, but adjust the denominator of t-ratios so that it is valid even if there is heteroskedasticity.

On the other hand, WLS attempts to increase the efficiency of the point estimate under heteroskedasticity. Indeed, WLS is "BLUE" under the stated assumptions that $E(uu')=\Omega$.

Of course, to make this result is useful in practice would require knowing $\Omega$, which is rarely the case. One then resorts to feasible GLS approaches, which however need not be BLUE anymore.

EDIT in response to the comment below:

This will in general lead to different point estimates. Consider a simple example of a regression without a constant for $n=2$ with $y=(1,3)$, $x=(1,2)$, $\omega_1^2=1$ and $\omega_1^2=2$.

Then, OLS is $$\hat{\beta}=\frac{1\cdot1+2\cdot3}{1\cdot1+2\cdot2}=\frac{7}{5}$$ whereas $$\hat{\beta}_{WLS}=\frac{\frac{1}{1}+\frac{6}{2}}{\frac{1}{1}+\frac{4}{2}}=\frac{4}{3}$$ You could reproduce this in R with

x <- c(1,2)
y <- c(1,3)
omega <- c(1,2)
wls <- lm(y~x-1, weights = 1/omega)
ols <- lm(y~x-1)
summary(wls)
summary(ols)


That said, there are some examples for when OLS=GLS. Consider the case in which there are as many observations $n$ as predictors $p$, such that $X$ is square.

Assume $X$ to be invertible. Then \begin{eqnarray*} \hat{\beta}_{WLS}&=&(X'\Omega^{-1}X)^{-1}X'\Omega^{-1}y\\ &=&X^{-1}{\Omega^{-1}}^{-1}\underbrace{{X'}^{-1}X'}_{=I}\Omega^{-1}y\\ &=&X^{-1}\underbrace{{\Omega^{-1}}^{-1}\Omega^{-1}}_{=I}y\\ &=&X^{-1}y\\ &=&X^{-1}{X'}^{-1}X'y\\ &=&(X'X)^{-1}X'y \end{eqnarray*}

• Thanks for the answer. But both estimators $\hat{\beta}_{WLS}$ and $\hat{\beta}_{OLS}$ should be numerically identically, or? And what is the usual approach for finding weights for the WLS approach? Since I usually don't know $\Omega$ I would have to run a first stage regression with OLS to use either some weighting approach or feasible GLS? Jun 24, 2017 at 15:44
• I edited my answer in response to the first question - answer is no! For the second, that is one leading approach, yes. Jun 24, 2017 at 16:55