[R] predict() and heteroskedasticity-robust standard errors

Achim Zeileis Achim.Zeileis at uibk.ac.at
Mon Jul 25 09:33:11 CEST 2011

On Mon, 25 Jul 2011, E Hofstadler wrote:

> Hello there,
> I have a linear regression model for which I estimated
> heteroskedasticity-robust (Huber-White) standard errors using the
> coeftest function
> in the lmtest-package.
> Now I would like to inspect the predicted values of the dependent
> variable for particular groups and include a confidence interval for
> this prediction.
> My question: is it possible to estimate confidence intervals for the
> values predicted by a model with heteroskedasticity-robust standard
> errors? The usual predict() function doesn't accept the objects
> of class "coef" returned by coeftest.

coeftest() returns objects of class "coeftest" and these do not contain 
enough information to do predictions of the response in any model.

> I'm not sure actually whether what I'm trying to do is statistically 
> meaningful, so any general advice is welcome.

My feeling is that it is not meaningful. The whole sandwich idea is that 
you can get a consistent estimate of the standard errors of the 
coefficient estimates - without specifying the standard errors (or even 
the whole likelihood) of the disturbances in the model. For 
observation-wise interval prediction, however, I think that you need some 
specification of the variance of the disturbances.


> Regards,
> Esther
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.

More information about the R-help mailing list