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 ______________________________________________ R-help@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.