Bug 16408 - strange bug related to stats:::predict.Arima and/or cbind
Summary: strange bug related to stats:::predict.Arima and/or cbind
Status: UNCONFIRMED
Alias: None
Product: R
Classification: Unclassified
Component: Models (show other bugs)
Version: R 3.2.0
Hardware: Other Linux
: P5 normal
Assignee: R-core
URL:
Depends on:
Blocks:
 
Reported: 2015-06-03 11:21 UTC by Benjamin Tyner
Modified: 2015-06-03 13:44 UTC (History)
0 users

See Also:


Attachments
test case (778 bytes, text/plain)
2015-06-03 11:21 UTC, Benjamin Tyner
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Benjamin Tyner 2015-06-03 11:21:18 UTC
Created attachment 1840 [details]
test case

Occasionally when using predict.Arima with a newxreg, I get warnings of the form:

    Error in cbind(intercept = rep(1, n), xreg) : 
      (converted from warning) number of rows of result is not a multiple of vector length (arg 2)

Please see attached for a reproducible example. If one browses within the cbind call, the second argument is actually a list at that point, due to

    class(xreg) <- NULL

which seems like a bug. On the other hand, the text of the warning from cbind is suggestive that there might be more going on related to lazy evaluation and/or method dispatch.
Comment 1 Benjamin Tyner 2015-06-03 13:44:43 UTC
To clarify: I'm aware that passing a data.frame for xreg to arima is not an officially supported/documented usage; what made this interesting (to me) was that the warning from cbind seems to be a red herring (usually, cbind(<vector>, <list>) would result in another list).