[R-SIG-Finance] GLM correcting for serial correlation
Brecknock, Peter
Peter.Brecknock at bp.com
Mon Dec 14 20:47:54 CET 2009
Karl
Check out
http://www.stat.pitt.edu/stoffer/tsa2/R_time_series_quick_fix.htm
Search for "regression with autocorrelated errors"
This offers two approaches ... using gls from the nlme package (as
suggested by Matthieu) or using arima with the xreg parameter
Best regards
Pete
-----Original Message-----
From: Matthieu Stigler [mailto:matthieu.stigler at gmail.com]
Sent: Monday, December 14, 2009 4:21 AM
To: Karl Schriek
Cc: r-sig-finance at stat.math.ethz.ch
Subject: Re: [R-SIG-Finance] GLM correcting for serial correlation
?gls from package nlme?
2009/12/14 Karl Schriek <kschriek at gmail.com>
> Hi
>
> I have a stationary time series to which I want to fit a linear model
with
> an autoregressive term to correct for serial correlation, i.e. using
the
> formula At = c1*Bt + c2*Ct + ut, where ut = r*ut-1 + et
>
> (i.e. ut is an AR(1) term to correct for serial correlation in the
error
> terms)
>
>
> Does anyone know what to use in R to model this?
>
>
> Thanks
> Karl
>
> [[alternative HTML version deleted]]
>
> _______________________________________________
> R-SIG-Finance at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-finance
> -- Subscriber-posting only.
> -- If you want to post, subscribe first.
>
[[alternative HTML version deleted]]
More information about the R-SIG-Finance
mailing list