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

BUG: Fix small data issues for ARIMA. #1149

Merged
merged 5 commits into from Oct 25, 2013

Conversation

Projects
None yet
4 participants
@jseabold
Copy link
Member

commented Oct 25, 2013

This closes #1146 and #1046.

  1. We now check to make sure that we have at least one degree of freedom to estimate the problem. If so, then we try the estimation.
    1. Most / all of these estimations will return garbage. We have an extra check that we can estimate stationary initial params. Usually we can't in these cases, so the usual error will be raised here asking to set start_params. This should be enough of a warning to the user that this is "odd." If in the small chance the estimation goes through for a model with 5 observations and 1 degree of freedom, it's on the user then to determine things are no good.
  2. We now avoid the problem of maxlag >= nobs happening in the call to AR so this avoids the problem of #1046 that also presented itself as part of #1146.
@coveralls

This comment has been minimized.

Copy link

commented Oct 25, 2013

Coverage Status

Coverage remained the same when pulling b70da1b on jseabold:fix-1146 into 1bc6576 on statsmodels:master.

@feathj

This comment has been minimized.

Copy link

commented Oct 25, 2013

This all looks good to me. Thanks again @jseabold

@josef-pkt

This comment has been minimized.

Copy link
Member

commented Oct 25, 2013

Looks good to me (I'm not familiar with all places where you need the nobs check)

Do you need to adjust now also the test in #1046 or is this fixed with maxlag = nobs - 1 ?

(In case we would need to override the nobs check at some point in the future, it would be easy to add and option #1150)

@jseabold

This comment has been minimized.

Copy link
Member Author

commented Oct 25, 2013

#1046 is handled by maxlag truncation. That's what I meant when I said we should never get to that failure in the first place.

In the event that we do get there somewhere, the size of the unsized object error should also never arise now that we don't squeeze down to scalars.

@jseabold

This comment has been minimized.

Copy link
Member Author

commented Oct 25, 2013

I checked that it passed locally. We'll see what happens on the pythonxy builds.

jseabold added a commit that referenced this pull request Oct 25, 2013

Merge pull request #1149 from jseabold/fix-1146
BUG: Fix small data issues for ARIMA.

@jseabold jseabold merged commit ff49a8e into statsmodels:master Oct 25, 2013

1 check passed

default The Travis CI build passed
Details

@josef-pkt josef-pkt referenced this pull request Nov 21, 2013

Closed

bugfix release 0.5.1 #1079

jseabold added a commit that referenced this pull request Nov 23, 2013

Backport PR #1149: BUG: Fix small data issues for ARIMA.
This closes #1146 and #1046.

1. We now check to make sure that we have at least one degree of freedom to estimate the problem. If so, then we try the estimation.
   1. Most / all of these estimations will return garbage. We have an extra check that we can estimate stationary initial params. Usually we can't in these cases, so the usual error will be raised here asking to set start_params. This should be enough of a warning to the user that this is "odd." If in the small chance the estimation goes through for a model with 5 observations and 1 degree of freedom, it's on the user then to determine things are no good.
2. We now avoid the problem of maxlag >= nobs happening in the call to AR so this avoids the problem of #1046 that also presented itself as part of #1146.

@jseabold jseabold deleted the jseabold:fix-1146 branch Dec 31, 2013

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

Merge pull request statsmodels#1149 from jseabold/fix-1146
BUG: Fix small data issues for ARIMA.

yarikoptic added a commit to yarikoptic/statsmodels that referenced this pull request Oct 23, 2014

Merge commit 'v0.5.0-13-g8e07d34' into debian
* commit 'v0.5.0-13-g8e07d34':
  Backport PR statsmodels#1200: BLD: do not install *.pyx *.c  MANIFEST.in
  Backport PR statsmodels#1157: Tst precision master
  Backport PR statsmodels#1149: BUG: Fix small data issues for ARIMA.
  Backport PR statsmodels#1125: REF/BUG: Some GLM cleanup. Used trimmed results in NegativeBinomial variance.
  Backport PR statsmodels#1124: BUG: Fix ARIMA prediction when fit without a trend.
  Backport PR statsmodels#1117: Update ex_arma2.py
  Backport PR statsmodels#1089: ENH: exp(poisson.logpmf()) for poisson better behaved.
  Backport PR statsmodels#1077: BUG: Allow 1d exog in ARMAX forecasting.
  Backport PR statsmodels#1075: BLD: Fix build issue on some versions of easy_install.
  Backport PR statsmodels#1071: Update setup.py to fix broken install on OSX
  Backport PR statsmodels#1057: COMPAT: Fix py3 caching for get_rdatasets.
  BUG: fix predict (was refactoring victim)

yarikoptic added a commit to yarikoptic/statsmodels that referenced this pull request Oct 23, 2014

Merge remote-tracking branch 'origin/maintenance/0.5.x' into releases
* origin/maintenance/0.5.x: (1875 commits)
  Backport PR statsmodels#1200: BLD: do not install *.pyx *.c  MANIFEST.in
  Backport PR statsmodels#1157: Tst precision master
  Backport PR statsmodels#1149: BUG: Fix small data issues for ARIMA.
  Backport PR statsmodels#1125: REF/BUG: Some GLM cleanup. Used trimmed results in NegativeBinomial variance.
  Backport PR statsmodels#1124: BUG: Fix ARIMA prediction when fit without a trend.
  Backport PR statsmodels#1117: Update ex_arma2.py
  Backport PR statsmodels#1089: ENH: exp(poisson.logpmf()) for poisson better behaved.
  Backport PR statsmodels#1077: BUG: Allow 1d exog in ARMAX forecasting.
  Backport PR statsmodels#1075: BLD: Fix build issue on some versions of easy_install.
  Backport PR statsmodels#1071: Update setup.py to fix broken install on OSX
  Backport PR statsmodels#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 statsmodels#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.
  ...
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.