添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接

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 why is it that in sarimax we only warn for non-invertible/stationary start params and in arima we fail? #6225 why is it that in sarimax we only warn for non-invertible/stationary start params and in arima we fail? #6225 ihadanny opened this issue Nov 4, 2019 · 9 comments

in this commit: https://github.com/statsmodels/statsmodels/commit/d03474da1aae5dac54c2b4441311d01517cd2567 the sarimax model was changed to only warn on non-invertible/stationary start_params and select "0" start params instead, while on ARMA we continue to fail if that happens.

Why? what's the reasoning behind not doing this automatically? will putting zeros instead always lead to fitting a non-invertible/stationary model? or is it bad otherwise?

Because the starting parameters estimators are usually consistent estimators of the true parameters (even if not efficient), if they suggest a non-stationary model then that likely indicates problems with the model specification. The original behavior of statsmodels was to raise an error in this case. However, there is nothing wrong with at least trying to fit a model in these cases, so using arbitrary stationary starting parameters (like all zeros) is a valid option.

More recently, there has been a greater emphasis on model selection / automatic forecasting / cross validation type exercises, where a large number of model specifications are evaluated, and the error became cumbersome to work around. Because of this, we modified SARIMAX to only issue a warning, so that these tasks would be easier.

We did not retrofit ARIMA because that model is essentially in a "maintenance-only" state.

(Closing as answered, but feel free to follow up if you have questions or comments).

thanks for your patience and quick response!!! several followup questions:

  • once the SARIMAX fit is done, how are you handling a non-invertible/stationary result? do you warn about it? raise an error? are you trying to convert it to a invertible/stationary result by some method?
  • and what is the code doing if the SARIMAX fit is done and the result is almost non-invertible/stationary? (the roots are close to the unit circle)
  • ARIMA because that model is essentially in a "maintenance-only" state - so are you recommending that we'll use SARIMAX instead whenever possible? or is there an advantage in continuing to use ARIMA?
  • once the SARIMAX fit is done, how are you handling a non-invertible/stationary result? do you warn about it? raise an error? are you trying to convert it to a invertible/stationary result by some method?

    If you have enforce_stationary=True and enforce_invertibility=True (the defaults), then it is not possible to get an non-stationary / non-invertible model.

    If you set those equal to False , then we just return the results, whether or not they are stationary / invertible. There's nothing wrong with a non-stationary / non-invertible model.

    and what is the code doing if the SARIMAX fit is done and the result is almost non-invertible/stationary? (the roots are close to the unit circle)

    We don't do anything special in this case, we just return the results as usual.

    ARIMA because that model is essentially in a "maintenance-only" state - so are you recommending that we'll use SARIMAX instead whenever possible? or is there an advantage in continuing to use ARIMA?

    It's probably best to use SARIMAX, yes.

    it is not possible to get an non-stationary / non-invertible model

    can you please point me to a paper or to the code of how you're doing that? are you replacing the bad roots with their reciprocals? or is it another procedure?

    There's nothing wrong with a non-stationary / non-invertible model

    why do you say so? in https://otexts.com/fpp2/arima-r.html they say that:

    Any roots close to the unit circle may be numerically unstable, and the corresponding model will not be good for forecasting

    doesn't that mean that non-stationary / non-invertible models are bad? or is it only a problem if the roots are close to the unit root, not if they are far inside/outside the circle? and if it's not a problem, than why did you say about the non-stationarity of the start_params that:

    if they suggest a non-stationary model then that likely indicates problems with the model specification

    I don't understand why its a problem there but not here.

    It's probably best to use SARIMAX, yes

    Then maybe it's a good idea that the popular https://github.com/tgsmith61591/pmdarima package use SARIMAX instead of ARIMA...