[R] AR in R

John Fox jfox at mcmaster.ca
Wed Jul 16 21:17:13 CEST 2003

Dear Steve,

At 11:45 AM 7/16/2003 -0700, CHRISS Steve wrote:
>R Help,
>How does one do a least squares regression with an AR component (for any
>order) in R?
>Steve Chriss

Do you mean a model with AR errors? If so, you can use the gls (generalized 
least squares) function in the nlme package. Some details and an example 
with AR(2) errors are in 

I hope that this helps,

John Fox
Department of Sociology
McMaster University
Hamilton, Ontario, Canada L8S 4M4
email: jfox at mcmaster.ca
phone: 905-525-9140x23604
web: www.socsci.mcmaster.ca/jfox

More information about the R-help mailing list