[R] NeweyWest

Achim Zeileis Achim.Zeileis at uibk.ac.at
Wed Feb 16 16:29:58 CET 2011


On Wed, 16 Feb 2011, stiff83 at gmx.de wrote:

> Hey everyone,
>
> For an investment strategy I built some portfolios of historical stock returns (every 6 month for 10 years->20observations). To get more observations I´m using overlapping observations(40obs. which means lag=1).The goal is to test whether the reruns are positiv or market efficient(=0).
>
> To correct for autocorrelation I would like to use NeweyWest(sandwich)in 
> R, to get the correct standard deviation for the t-test, but NeweyWest 
> requires a regression model (lm or glm) which I dont have. Is there a 
> possibility to do this without a linear model??

Use the trivial linear model lm(y ~ 1) whose only coefficient then 
corresponds to the estimated mean of y.

Furthermore, if I understand you correctly, you induce a strong 
autocorrelation by using the overlapping observations. So you may be 
better off modeling this explicitly in an arima() model, or maybe a gls() 
approach.

hth,
Z

> Thanks!!! solari
> -- 
> GMX DSL Doppel-Flat ab 19,99 Euro/mtl.! Jetzt mit 
> gratis Handy-Flat! http://portal.gmx.net/de/go/dsl
>
> ______________________________________________
> 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