Skip to content
Prev 4370 / 15274 Next

How to compare two asynchroneous xts time series?

The dyn package facilitates regression of time series
by automatically intersecting the components.  It
currently does not work with xts but its easy to
convert those to zoo just prior to performing the
regression. Just preface lm with dyn$ as shown.
It also works with glm and other regression functions
that are sufficiently similar to lm.
+ 2008-06-02 09:01:00,5010.0
+ 2008-06-02 09:02:00,5014.0
+ 2008-06-02 09:03:00,5012.5
+ 2008-06-02 09:04:00,5013.5
+ 2008-06-02 09:05:00,5009.5
+ 2008-06-02 09:06:00,5007.0
+ 2008-06-02 09:07:00,5006.5
+ 2008-06-02 09:08:00,5008.5
+ 2008-06-02 09:09:00,5004.5"
+ 2008-06-02 09:03:00,7117.0
+ 2008-06-02 09:05:00,7111.0
+ 2008-06-02 09:07:00,7107.0
+ 2008-06-02 09:09:00,7102.5"
Call:
lm(formula = dyn(Z2 ~ Z1))

Coefficients:
(Intercept)           Z1
  -2120.912        1.843
On Mon, Jun 22, 2009 at 8:23 AM, anass<anass.mouhsine at gmail.com> wrote: