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

Some issues with ARMAX forecasting #1076

Closed
jseabold opened this issue Sep 10, 2013 · 1 comment

Comments

Projects
None yet
1 participant
@jseabold
Copy link
Member

commented Sep 10, 2013

Not reported but evident here: http://nbviewer.ipython.org/cb6e9b476a41586958b5
Reported here: http://stackoverflow.com/questions/18721547/armax-model-forecasting-leads-to-valueerror-matrices-are-not-aligned-when-pas

Replicate

y = np.random.random(100)
x = np.random.random(100)
mod = sm.tsa.ARMA(y, (2,1), x).fit()
newx = np.random.random(12)

This breaks because we need to ensure that exog is 2d.

mod.forecast(steps=12, alpha=.05, exog=newx)

This gets further but falls down later

mod.forecast(steps=12, alpha=.05, exog=newx[:,None])

Need to investigate what's going on.

@jseabold

This comment has been minimized.

Copy link
Member Author

commented Sep 10, 2013

It falls down because you need to pass in past data too. If you want to predict 12 steps ahead with an ARMAX(2,q) model then you need to pass in 14 exogenous observations. I'm going to fix the dims check in exog and add this to the docs.

jseabold added a commit to jseabold/statsmodels that referenced this issue Sep 10, 2013

jseabold added a commit to jseabold/statsmodels that referenced this issue Oct 23, 2013

jseabold added a commit that referenced this issue Nov 23, 2013

Backport PR #1077: BUG: Allow 1d exog in ARMAX forecasting.
Closes #1076. Another candidate for backporting.

PierreBdR pushed a commit to PierreBdR/statsmodels that referenced this issue Sep 2, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.