This post was nearly what I was searching for.
Im actually trying to reproduce my Stata results in R and donĀ“t overcome the problem of the NeweyWest Estimators. I have quarterly PanelData In Stata i used: newey y x, lag(4) force In R this should be reg1.2<-lm(y~x) coeftest(reg1.2, df = Inf, vcov = NeweyWest(reg1.2, lag = 4,prewhite=0)) but i get slightly different Std. Dev. and P-values. Do i use the wrong command? Or the wrong specification? Thanks a lot for your suggestions! Katie Achim Zeileis-4 wrote > On Sun, 27 Jun 2010, Jurica Brajkovi? wrote: > >> I want to calculate Newey West robust standard error using NeweyWest. >> Comparing the results to what I get in STATA, in order to get the same >> results in I need to specify "prewhite=0". Can someone explain what this >> prewhite command means? > > It controls whether autocorrelation in the estimating functions should be > removed/reduced by using a VAR model. > > ?NeweyWest says: > > prewhite: logical or integer. Should the estimating functions be > prewhitened? If 'TRUE' or greater than 0 a VAR model of order > 'as.integer(prewhite)' is fitted via 'ar' with method '"ols"' > and 'demean = FALSE'. The default is to use VAR(1) > prewhitening. > > The "Details" section adds: To obtain the estimator described in Newey & > West (1987), prewhitening has to be suppressed. > > References can also be found on the manual page as well as in Section 3.2 > of vignette("sandwich", package = "sandwich"). > Z > >> >> >> Thanks >> >> >> [[alternative HTML version deleted]] >> >> ______________________________________________ >> > R-help@ > mailing list >> <https://stat.ethz.ch/mailman/listinfo/r-help> https://stat.ethz.ch/mailman/listinfo/r-help >> PLEASE do read the posting guide >> <http://www.R-project.org/posting-guide.html> http://www.R-project.org/posting-guide.html >> and provide commented, minimal, self-contained, reproducible code. >> > > ______________________________________________ > R-help@ > mailing list > <https://stat.ethz.ch/mailman/listinfo/r-help> https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide > <http://www.R-project.org/posting-guide.html> http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. [[alternative HTML version deleted]]
______________________________________________ R-help@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.