E Hofstadler
2011-Jul-25 06:27 UTC
[R] predict() and heteroskedasticity-robust standard errors
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. I'm not sure actually whether what I'm trying to do is statistically meaningful, so any general advice is welcome. Regards, Esther
Achim Zeileis
2011-Jul-25 07:33 UTC
[R] predict() and heteroskedasticity-robust standard errors
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. hth, Z> Regards, > Esther > > ______________________________________________ > R-help at r-project.org mailing list > stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. >
Possibly Parallel Threads
- HAC corrected standard errors
- heteroskedasticity-robust standard errors
- Problems with obtaining t-tests of regression coefficients applying consistent standard errors after run 2SLS estimation. Clearer !!!!!
- Error using coeftest() with a heteroskedasticity-consistent estimation of the covar.
- Heteroskedasticity and Autocorrelation in SemiPar package