[R] Linear model and time series

Achim Zeileis Achim.Zeileis at wu-wien.ac.at
Mon Apr 2 11:47:12 CEST 2007


On Sun, 1 Apr 2007, John C Frain wrote:

> This question is not as simple as might appear.

But it might as well be - I try to answer the questions people ask instead
of guessing what they wanted to ask but did not.

> As the data are time
> series one should be very concerned about the distribution of the
> residuals,   Are the series stationary and if not are they integrated
> of the same order and cointegrated.

<snip>

> My recommendation to Andre would be to study a good book on
> time-series analysis.  One is not doing him a favour by recommending a
> procedure to him that may lead to spurious results when not applied
> properly.

All the points you raise above are valid, of course, but note that I did
not "recommend" a procedure. The original poster wrote down a linear model
that he wanted to estimate by OLS (aka lm()) and I just told him how he
can do that conveniently in R.

Whether or not the linear model is appropriate in this situation (and
there are time-series relationships where it is) I cannot say - but,
contrary to you, I assume that the poster knows what he is doing.

Z



More information about the R-help mailing list