[R] Could dynlm function work for xts objects?

jpm miao miaojpm at gmail.com
Thu Apr 12 05:32:36 CEST 2012


It seems to only works for zoo or ts objects?

I tried to run it for xts objects, and error message occurs. Once I
coerce it to be an zoo object (by as.zoo), it works.

Error message:


Error in model.frame.default(formula = dynformula(PIh - PI ~ L(X, 0:i) +  :
  variable lengths differ (found for 'L(X, 0:i)')
In addition: Warning messages:
1: In zoo(coredata(x), order.by = index(x), ...) :
  some methods for “zoo” objects do not work if the index entries in
‘order.by’ are not unique
2: In zoo(coredata(x), order.by = index(x), ...) :
  some methods for “zoo” objects do not work if the index entries in
‘order.by’ are not unique



More information about the R-help mailing list