[R] NeweyWest

Achim Zeileis Achim.Zeileis at uibk.ac.at
Sun Jun 27 23:24:47 CEST 2010

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)

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").

> Thanks
> 	[[alternative HTML version deleted]]
> ______________________________________________
> 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