[R] correcting for autocorrelation in models with panel data?

David Hugh-Jones davidhughjones at gmail.com
Thu Feb 10 18:15:29 CET 2005


Hi 

I have some panel data for the 50 US states over about 25 years, and I
would like to test a simple model via OLS, using this data. I know how
to run OLS in R, and I think I can see how to  create Panel Corrected
Standard Errors using

http://jackman.stanford.edu/classes/350C/pcse.r

What I can't figure out is how to correct for autocorrelation over
time. I have found a lot of R stuff on time series models but they all
seem focused on predicting a single variable from its previous values.
Can anyone explain to me how to detect and get round autocorrelation?
Is there a package for panel data that I have missed?

I appreciate that this is probably just as much about my ignorance of
econometrics as about R itself!

Cheers
David




More information about the R-help mailing list