Hi R-Community, I have two correlated time series X[t] and Y[t]. X[t] can be modeled as X[t] = a[1]X[t-1] + a[2]X[t-2] + e[t] + b[1]e[t-1] + b[2]e[t-2] + c[0]Y[t] where e[t] is a white noise process. Is there a way to estimate the coefficients a[1], a[2], b[1], b[2] and c[0]? Much thanks in advance, Hagen Schm?ller -- Dipl.-Ing. Hagen K. Schm?ller Institut f?r Elektrische Anlagen und Energiewirtschaft, RWTH Aachen Schinkelstra?e 6, D-52056 Aachen, Germany Tel.: +49 (0)241 80-96734 Fax : +49 (0)241 80-92197 Hagen.Schmoeller at iaew.rwth-aachen.de -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
you can use the function arima() in the 'ts'-package and include y[t] as 'xreg'. -----Original Message----- From: Hagen Schm?ller [mailto:Hagen.Schmoeller at iaew.rwth-aachen.de] Sent: 06 September 2002 08:40 To: r-help at stat.math.ethz.ch Subject: [R] Estimating parameters of a linear model Hi R-Community, I have two correlated time series X[t] and Y[t]. X[t] can be modeled as X[t] = a[1]X[t-1] + a[2]X[t-2] + e[t] + b[1]e[t-1] + b[2]e[t-2] + c[0]Y[t] where e[t] is a white noise process. Is there a way to estimate the coefficients a[1], a[2], b[1], b[2] and c[0]? Much thanks in advance, Hagen Schm?ller -- Dipl.-Ing. Hagen K. Schm?ller Institut f?r Elektrische Anlagen und Energiewirtschaft, RWTH Aachen Schinkelstra?e 6, D-52056 Aachen, Germany Tel.: +49 (0)241 80-96734 Fax : +49 (0)241 80-92197 Hagen.Schmoeller at iaew.rwth-aachen.de -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-. -.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._. _._ If you have received this e-mail in error or wish to read our e-mail disclaimer statement and monitoring policy, please refer to http://www.drkw.com/disc/email/ or contact the sender -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
Roughly speaking you have (at least) two way in R: library(ts) arima(x, order=c(2,0,2), xreg=y) library(nlme) gls(x~y,correlation=corARMA(p=2,q=2)) However if you have just one serie, arima() is faster (in my experience). Prof. J. Lindsey's libraries (repeated and friends) should allow much more options (e.g. different distribution), but *as far as I know* these don't allow immediately direct modelling of MA components. Am I wrong? Follow the links in R home page best, vito ----- Original Message ----- From: "Hagen Schm?ller" <Hagen.Schmoeller at iaew.rwth-aachen.de> To: <r-help at stat.math.ethz.ch> Sent: Friday, September 06, 2002 8:39 AM Subject: [R] Estimating parameters of a linear model Hi R-Community, I have two correlated time series X[t] and Y[t]. X[t] can be modeled as X[t] = a[1]X[t-1] + a[2]X[t-2] + e[t] + b[1]e[t-1] + b[2]e[t-2] + c[0]Y[t] where e[t] is a white noise process. Is there a way to estimate the coefficients a[1], a[2], b[1], b[2] and c[0]? Much thanks in advance, Hagen Schm?ller -- Dipl.-Ing. Hagen K. Schm?ller Institut f?r Elektrische Anlagen und Energiewirtschaft, RWTH Aachen Schinkelstra?e 6, D-52056 Aachen, Germany Tel.: +49 (0)241 80-96734 Fax : +49 (0)241 80-92197 Hagen.Schmoeller at iaew.rwth-aachen.de -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-. -.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._. _._ -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._