Alex Rivera | Logout

How to update summary when using NeweyWest?

Asked 2011-07-14T09:50:44.193
16

I am using NeweyWest standard errors to correct my lm() / dynlm() output. E.g.:

fit1<-dynlm(depvar~covariate1+covariate2)
coeftest(fit1,vcov=NeweyWest)

Coefficients are displayed the way I´d like to, but unfortunately I loose all the regression output information like R squared, F-Test etc. that is displayed by summary. So I wonder how I can display robust se and all the other stuff in the same summary output.

Is there a way to either get everything in one call or to overwrite the 'old' estimates? I bet I just missed something badly, but that is really relevant when sweaving the output.

Test example, taken from ?dynlm.

require(dynlm)
require(sandwich)
data("UKDriverDeaths", package = "datasets")
uk <- log10(UKDriverDeaths)
dfm <- dynlm(uk ~ L(uk, 1) + L(uk, 12))

#shows R-squared, etc.
summary(dfm)

#no such information
coeftest(dfm, vcov = NeweyWest)

btw.: same applies for vcovHC

Edit
Report

1 Answer

0

If you specify the covariance matrix, the F-statistics change and you need to compute it again using waldtest() right? Because

temp.summ$coefficients <- unclass(coeftest(temp.lm, vcov. = NeweyWest))

only overwrites the coefficients. F-statistics change but R^2 remains the same .

answered 2013-01-21T21:04:18.420

Your Answer