Dear all, I'm looking for how can I estimate a linear model with ar(ma) errors : y(t)=a*X(t)+e(t) with P(B)e(t)=Q(B)u(t) where u is a white noise and P, Q are some polynomes. Could you help me ? Gr?gory Benmenzer
"Gregory BENMENZER" <gregory.benmenzer at gazdefrance.com> writes:> Dear all, > > I'm looking for how can I estimate a linear model with ar(ma) errors : > > y(t)=a*X(t)+e(t) with > P(B)e(t)=Q(B)u(t) > > where u is a white noise and P, Q are some polynomes. > > Could you help me ? > > Gr?gory BenmenzerPerhaps function gls in the nlme package. See help('gls', package = 'nlme')
That's discussed in Pinhiero and Bates, Mixed Effects Models in S and S-Plus. I don't have the book in my hand now, so I can't tell you exactly where to find it. However, I'm pretty confident that it can be done in "lme". Spencer Graves Gregory BENMENZER wrote:> Dear all, > > I'm looking for how can I estimate a linear model with ar(ma) errors : > > y(t)=a*X(t)+e(t) with > P(B)e(t)=Q(B)u(t) > > where u is a white noise and P, Q are some polynomes. > > Could you help me ? > > Gr?gory Benmenzer > > ______________________________________________ > R-help at stat.math.ethz.ch mailing list > http://www.stat.math.ethz.ch/mailman/listinfo/r-help
> Dear all, > > I'm looking for how can I estimate a linear model with ar(ma) errors : > > y(t)=a*X(t)+e(t) with > P(B)e(t)=Q(B)u(t) > > where u is a white noise and P, Q are some polynomes. > > Could you help me ?Isn't this what arima in library ts does? Put X(t) into xreg and specify the order of the arma error via the order argument. The documentation for arima doesn't actually explain how xreg enters the model, but if it is like the S-Plus arima.mle() function then it does what you want. The BIG advantage of the R implementation is that it gives inference for the regression coefficients. [Aside to Brian Ripley: Can you please add a few lines to the arima help file to define the model with a non-null xreg?] Cheers, Rob ___________________________________________________ Rob J Hyndman Associate Professor & Director of Consulting Department of Econometrics & Business Statistics Monash University, VIC 3800, Australia. http://www-personal.buseco.monash.edu.au/~hyndman/