BUG: Fix ARIMA prediction when fit without a trend. #1124

Merged
merged 9 commits into from Oct 23, 2013

Projects

None yet

3 participants

@jseabold
Member

No description provided.

@josef-pkt josef-pkt and 1 other commented on an outdated diff Oct 23, 2013
statsmodels/tsa/arima_model.py
@@ -1350,6 +1354,14 @@ def forecast(self, steps=1, exog=None, alpha=.05):
conf_int : array
2d array of the confidence interval for the forecast
"""
+ if exog is not None:
+ if self.k_exog == 1 and exog.ndim == 1:
+ exog = exog[:,None]
@josef-pkt
josef-pkt Oct 23, 2013 Member

same as in PR #1077 ?
better here because of the self.k_exog == 1 check

@jseabold
jseabold Oct 23, 2013 Member

We should probably make a convenience function for this. _make_conformable(exog, k_exog).

@josef-pkt
Member

looks fine to me, but I don't know this part of the code

@coveralls

Coverage Status

Coverage remained the same when pulling 8513ea6 on jseabold:fix-1123 into 3b7082c on statsmodels:master.

@jseabold
Member

Rebased.

@coveralls

Coverage Status

Coverage remained the same when pulling 11bc533 on jseabold:fix-1123 into b357e62 on statsmodels:master.

@jseabold jseabold merged commit 24c4426 into statsmodels:master Oct 23, 2013

1 check passed

default The Travis CI build passed
Details
@jseabold jseabold deleted the jseabold:fix-1123 branch Oct 23, 2013
@josef-pkt josef-pkt referenced this pull request Nov 21, 2013
Closed

bugfix release 0.5.1 #1079

@yarikoptic yarikoptic added a commit to yarikoptic/statsmodels that referenced this pull request Oct 23, 2014
@yarikoptic yarikoptic Merge commit 'v0.5.0-13-g8e07d34' into debian
* commit 'v0.5.0-13-g8e07d34':
  Backport PR #1200: BLD: do not install *.pyx *.c  MANIFEST.in
  Backport PR #1157: Tst precision master
  Backport PR #1149: BUG: Fix small data issues for ARIMA.
  Backport PR #1125: REF/BUG: Some GLM cleanup. Used trimmed results in NegativeBinomial variance.
  Backport PR #1124: BUG: Fix ARIMA prediction when fit without a trend.
  Backport PR #1117: Update ex_arma2.py
  Backport PR #1089: ENH: exp(poisson.logpmf()) for poisson better behaved.
  Backport PR #1077: BUG: Allow 1d exog in ARMAX forecasting.
  Backport PR #1075: BLD: Fix build issue on some versions of easy_install.
  Backport PR #1071: Update setup.py to fix broken install on OSX
  Backport PR #1057: COMPAT: Fix py3 caching for get_rdatasets.
  BUG: fix predict (was refactoring victim)
985a57e
@yarikoptic yarikoptic added a commit to yarikoptic/statsmodels that referenced this pull request Oct 23, 2014
@yarikoptic yarikoptic Merge remote-tracking branch 'origin/maintenance/0.5.x' into releases
* origin/maintenance/0.5.x: (1875 commits)
  Backport PR #1200: BLD: do not install *.pyx *.c  MANIFEST.in
  Backport PR #1157: Tst precision master
  Backport PR #1149: BUG: Fix small data issues for ARIMA.
  Backport PR #1125: REF/BUG: Some GLM cleanup. Used trimmed results in NegativeBinomial variance.
  Backport PR #1124: BUG: Fix ARIMA prediction when fit without a trend.
  Backport PR #1117: Update ex_arma2.py
  Backport PR #1089: ENH: exp(poisson.logpmf()) for poisson better behaved.
  Backport PR #1077: BUG: Allow 1d exog in ARMAX forecasting.
  Backport PR #1075: BLD: Fix build issue on some versions of easy_install.
  Backport PR #1071: Update setup.py to fix broken install on OSX
  Backport PR #1057: COMPAT: Fix py3 caching for get_rdatasets.
  BUG: fix predict (was refactoring victim)
  DOC: Update release notes with maint branch changes.
  MAINT: Fix mailmap entry.
  BUG: fix warning arguments in GenericLikelihoodModel
  MAINT: Add name to .mailmap.
  ENH: Pandas Series no longer inherits from ndarray. Closes #1036.
  TST: Fixed test for Anaconda on Windows
  TST: Make test compatible with pandas 0.7.x
  BUG: Fail gracefully when not enough obs given for order.
  ...
7ae7ee7
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment