Hi Everyone, I am trying to do a time series regression using the lm function. However, according to the durbin watson test the errors are autocorrelated. And then I tried to use the gls function to accomodate for the autocorrelated errors. My question is how do I know what ARMA process (order) to use in the gls function? Or is there any other way to do the time series regression in R? I highly appreciate your help. Thanks, Bereket [[alternative HTML version deleted]]
Hi Everyone, I am trying to do a time series regression using the lm function. However, according to the durbin watson test the errors are autocorrelated. And then I tried to use the gls function to accomodate for the autocorrelated errors. My question is how do I know what ARMA process (order) to use in the gls function? Or is there any other way to do the time series regression in R? I highly appreciate your help. Thanks, Bereket [[alternative HTML version deleted]]
Hi Everyone, One more information to my question. I am trying to do a time series regression using the lm function. *My intention is to investigate the relationship between a dependent time series variable and several independent time series variables.* According to the durbin watson test the errors are autocorrelated. And then I tried to use the gls function to accomodate for the autocorrelated errors. My question is how do I know what ARMA process (order) to use in the gls function? Or is there any other way to do the time series regression in R? I highly appreciate your help. Thanks, Bereket [[alternative HTML version deleted]]
Your entering into a complex danger zone here because you really need to check first if all the dependent and independent variables are stationary. Otherwise, your lm results are meaningless ( you're estimation a spurious regression ). I would look at Bernhard Pfaff's yellow book or any other decent time series econometrics text ( hayashi, hamilton ) for more on this topic. It's a quite complex problem you are working on so you need to get familiar with the cointegration/unit root concepts, if you aren't already. -----Original Message----- From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org] On Behalf Of bereket weldeslassie Sent: Thursday, March 20, 2008 11:54 AM To: r-help at stat.math.ethz.ch; r-help at r-project.org Subject: [R] Fwd: time series regression Hi Everyone, One more information to my question. I am trying to do a time series regression using the lm function. *My intention is to investigate the relationship between a dependent time series variable and several independent time series variables.* According to the durbin watson test the errors are autocorrelated. And then I tried to use the gls function to accomodate for the autocorrelated errors. My question is how do I know what ARMA process (order) to use in the gls function? Or is there any other way to do the time series regression in R? I highly appreciate your help. Thanks, Bereket [[alternative HTML version deleted]] ______________________________________________ R-help at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
bereket weldeslassie wrote:> Hi Everyone, > One more information to my question. I am trying to do a time series > regression using the lm function. *My intention is to investigate the > relationship between a dependent time series variable and several > independent time series variables.* According to the durbin watson test the > errors are autocorrelated. And then I tried to use the gls function to > accomodate for the autocorrelated errors. My question is how do I know what > ARMA process (order) to use in the gls function? Or is there any other way > to do the time series regression in R? I highly appreciate your help. > Thanks, > Bereket > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. > > >Hi, Temporal autocorrelation seems to be a contagious process... even for emails. I received yours three times in 5 minutes. Concerning your question, I am no expert in time series, but you may also try ordinary least squares after 'removing' autocorrelation. This can be achieved by regression onto a lagged variable (see lag.listw in spdep, which can also be applied to temporal context), or onto eigenvectors of a temporal proximity matrix. Cheers, Thibaut. -- ###################################### Thibaut JOMBART CNRS UMR 5558 - Laboratoire de Biom?trie et Biologie Evolutive Universite Lyon 1 43 bd du 11 novembre 1918 69622 Villeurbanne Cedex T?l. : 04.72.43.29.35 Fax : 04.72.43.13.88 jombart at biomserv.univ-lyon1.fr http://lbbe.univ-lyon1.fr/-Jombart-Thibaut-.html?lang=en http://adegenet.r-forge.r-project.org/
Dear, I am doing a time series regression (one dependent time series variable, 7 independent time series variables and 32 annual observations). I have the problem of cointegration, autocorrelation and multicollinearity. I am considering an error correction model of the form: diff(lnY(t))=a+b1*lnY(t-1)+b2*lnX(t-1)+b3*diff(lnX(t))+error and not able to solve all problems. Any suggestion how to built a good model that solves these problems? I appreciate your help. Thanks, Bereket [[alternative HTML version deleted]]