[R] Linear model and time series

Achim Zeileis Achim.Zeileis at wu-wien.ac.at
Sat Mar 31 20:05:35 CEST 2007


On Sat, 31 Mar 2007, Andre Jung wrote:

> Dear all,
>
> I have three timeseries Uts, Vts, Wts. The relation between the time
> series can be expressed as
>
> Uts = x Vts + y Wts + residuals
>
> How would I feed this to lm() to evaluate the unknowns x and y?

If the time series are aligned (and univariate) you can just do
  lm(Uts ~ Vts + Wts)
If not, have a look at the "dynlm" and/or "dyn" packages.
Z

> Thanks,
> andre
>
> ______________________________________________
> R-help at stat.math.ethz.ch 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.
>
>



More information about the R-help mailing list