Skip to content
Prev 155003 / 398506 Next

Correct for heteroscedasticity using car package

On Thu, 4 Sep 2008, Carrasco-Torrecilla, Roman R wrote:

            
If you have a reasonable approximation of the pattern of 
heteroskedasticity, you can supply it in the "weights" argument to lm() 
and perform WLS.

hccm() on the other hand does not assume a particular pattern of 
heteroskedasticity (with the obvious advantages and disadvantages). You 
can easily employ it for inference based on Wald statistics. The 
"car" package provides linear.hypothesis() for this and the package 
"lmtest" provides functions coeftest() and waldtest().
The "sandwich" package which provides more flexible implementations of 
the estimators underlying hccm() as well as other estimators has
   vignette("sandwich", package = "sandwich")
with some background information and hands-on examples.

hth,
Z