Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

arimax warning. Why? #771

Closed
espher1987 opened this issue Jan 28, 2019 · 2 comments · Fixed by #773
Closed

arimax warning. Why? #771

espher1987 opened this issue Jan 28, 2019 · 2 comments · Fixed by #773

Comments

@espher1987
Copy link

espher1987 commented Jan 28, 2019

Hi, i am getting problems with the last updated on cran. My goal is to get an Arimax model, so this is a basic example of the warning i get.

in the past. in forecast 8.4 using the next example.

library(forecast)
set.seed(1)
x <- rbinom(length(AirPassengers),1,0.5)
model <- Arima(AirPassengers,order = c(1,1,0),c(1,1,0),xreg = x)
forecast(model,xreg=c(1,1,1,0,0))

i dont get any error everything looks great, not warning either.

but in forecast 8.5
the same code give me this:

Warning message:
In forecast.Arima(model, xreg = c(1, 1, 1, 0, 0)) :
xreg contains different column names from the xreg used in training. Please check that the regressors are in the same order.

i must say i am getting the forecast information. But why this warning? based in 8.5 documentation xreg can be "A numerical vector".

same happens even if i do:

library(forecast)
set.seed(1)
x <- rbinom(length(AirPassengers),1,0.5)
model <- Arima(AirPassengers,order = c(1,1,0),c(1,1,0),xreg = x)

x <- c(1,1,1,0,0)
forecast(model,xreg=x)

Thanks in advance.

@mitchelloharawild
Copy link
Collaborator

mitchelloharawild commented Jan 30, 2019 via email

@espher1987
Copy link
Author

Thanks, but why this warning is showed even when you are not working with matrix. I use a numeric vector, so, a warning that tell me about "column names" and "regressors in same order" is weird. I get the idea if i use matrix, now i get it, but if i use a numeric vector, should this warning still be showed? Documentation says that numeric vector is allowed. I just feel a bit confuse. Thanks in advance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants