# Do I get the heteroskedasticity-robust standard errors from my OLS or WLS regression?

I have a multiple regression linear model which I ran a simple OLS test on.

I then performed the White test and found that it was heteroskedastic.

Then I performed a Weighted Least Squares regression on the model, to account for the heteroskedasticity.

Now I need to use heteroskedasticity-robust standard errors (HRSE) for my inference, but I'm not sure whether to get the SEs from my OLS regression or my WLS one.

I'm asking because when I run a coefficient test on the WLS regression with or without HRSE, I get the same inference results; but I'm not sure if it makes sense to get HRSEs from a WLS regression, since WLS already accounts for heteroskedasticity.

Thanks in advance for any help!

Do I get the HRSEs from my OLS, or WLS regression?

You can get robust standard errors by using the Sandwich estimator. The optimization problem for the wOLS problem is: $$\max_{\beta} -\frac{1}{2} \sum_{i=1}^{n} w_i(y_i - X_i\beta)^{2}.$$ The maximizer of this objective function is the MLE for the model defined by: $$$$y_i \sim N(X_i\beta, w_i^{-1})$$$$

Taking a the first derivative, we get an estimating equation, the solution of which is the MLE for $$\beta$$: $$\sum_{i=1}^{n} w_i X_i(y_i - X_i\beta) = 0$$

The information is given by: $$A(\beta) = X^{T}WX.$$

If one believes the normal heteroskedastic model then the MLE is an efficient estimator of $$\beta$$ and it has a covariance matrix $$A(\beta)^{-1}$$. Otherwise, the MLE is consistent (though not efficient) and a consistent estimator for the variance is given by: $$A(\beta)^{-1} B(\beta) A(\beta)^{-1} \rightarrow^P Cov(\hat\beta)$$ with: $$B(\beta) = \sum_{i=1}^{n} w_i^{2}(y_i - X_i\beta)^{2}X_i^{T}X_i,$$ this is the sandwich estimator. A good reference for the derivation of the sandwich variance estimate is Van Der Vaart's Asymptotic Statistics | Cambridge Series in Statistical and Probabilistic Mathematics.

• Since the weights are derived from the sample, there should be more terms when you take derivatives, and hence the standard errors are too small. – StasK Feb 23 at 17:24

If your OLS model is heteroskedastic, you can either use heteroskedasticity-robust standard errors for the OLS model (such as Huber-White standard errors) or use a WLS model instead of your OLS model.

Both are methods for correcting for the violation of the homoskedasticity assumption in the OLS model.

• The second approach (WLS) may however still provide misleading inference when the WLS scheme used in estimation does not correspond to the actual heteroskedasticity in the data, so that there still may be use for making such WLS standard errors robust to misspecification of the second moments. – Christoph Hanck Feb 23 at 9:42
• @ChristophHanck Actually, I think you can hybridize the approach. WLS requires a working estimate of the variance. However, in this question, I found a sandwich variance estimate for the more general GLS model. stats.stackexchange.com/questions/331840/… Suppose the working variance is wrong, the sandwich should obtain a consistent estimate of the actual variance of the parameters, just like in OLS. – AdamO Feb 23 at 18:49
• @AdamO, I believe we mean the same thing! – Christoph Hanck Feb 23 at 19:06

You should run OLS and do the heteroskedasticity robust standard errors. Unless you have a very clear evidence that your variability changes by a factor of maybe five between the extremes in your sample, you should stick to OLS because doing it right with

1. Test for heteroskedasticity and
2. If rejected, run a conditional WLS model

-- that process produces crazy distributions and an extreme difficulties in controlling for the type I error. This used to be a popular niche theme in theoretical econometrics in 1990s (https://www.tandfonline.com/doi/abs/10.1080/07474939708800376), but it seems to have been forgotten since.

• This is right. WLS doesn't address heteroscedasticity unless the specific form of heteroscedasticity is known apriori. – AdamO Feb 23 at 18:23