Skip to content

ENH: Statespace: Improve operability with wrappers. - #2598

Closed
ChadFulton wants to merge 7 commits into
statsmodels:masterfrom
ChadFulton:ss-wrapper
Closed

ChadFulton wants to merge 7 commits into
statsmodels:masterfrom
ChadFulton:ss-wrapper

Conversation

@ChadFulton

Copy link
Copy Markdown
Member

Does the following

  • Fixes SARIMAXResultsWrapper.resid throws exception #2584 by improving the attach_rows and attach_dates functions to correctly support 0-dim, 1-dim, and >1-dim input.
  • Adds cov wrapping to predict, forecast, and cov_params_* results.
  • Removes the full_results argument from MLEModel.predict. This is required to properly support wrapping predict and forecast. This may break people's code who have been using SARIMAX etc. up to now and following the example notebooks. It also temporarily means that there is no obvious way to get prediction / forecast errors for confidence intervals.
  • Allows forecast to be specified with an end date (previously only allowed the number of steps).

@ChadFulton

Copy link
Copy Markdown
Member Author

It also updates the notebooks to not use full_results and to use the new wrappers (it's much cleaner when plotting with dates, for example). It removes the confidence intervals for the time being, until we can re-add them in the post-estimation PR (#2566).

I should also say that this PR has a particular approach to fixing #2584 which is better and more consistent overall, but which does have a backwards-incompatible change. There are other fixes which don't have that change, but then we'll have to address this problem at some point.

I don't know what the policy is / should be on that here, since there hasn't been a release yet, but on the other hand SARIMAX has been "around" for a while.

@ChadFulton

Copy link
Copy Markdown
Member Author

This is very strange - failures only on the Python 2.7 with most updated packages. I can't replicate the failures, and they don't seem like they should have anything to do with the changes here. Anyone seen this before?

@josef-pkt

Copy link
Copy Markdown
Member

Compared to a previous multivariate testrun that passed on Travis, it has the same version numbers for numpy/scipy/pandas but it's downloading here also gfortran and openblas which we shouldn't need.

@ChadFulton

Copy link
Copy Markdown
Member Author

I restarted a previously passing multivariate test run on Travis, and it is now failing, with the same failure (although in this PR's test run there are also 3 errors that come up, still unrelated to the changes made in this PR).

@josef-pkt

Copy link
Copy Markdown
Member

Wrapping the cov in this PR could be the source of bugs if we use the cov of the wrapped results instance for calculations. Pandas DataFrames don't always behave in the intended way in calculations designed for using numpy arrays.

However, I didn't see any possible problems while browsing the code for _get_robustcov_results.

@ChadFulton

Copy link
Copy Markdown
Member Author

This PR is superseded by #2566, which incorporates all of the changes found here.

@ChadFulton ChadFulton closed this Sep 5, 2015
@ChadFulton
ChadFulton deleted the ss-wrapper branch January 16, 2016 08:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants