AttributeError: 'ARIMAResults' object has no attribute 'plot_predict'

Open
#8,965 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
30/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
python
Domain
data

Research direction

Start by running the supplied example and inspect the ARIMA and plot_predict entry points named in the report. Determine which calling convention is supported in statsmodels 0.14.0, then make the supported usage clear in the relevant API or documentation and verify the example's behavior.

Written by the indexing model from the issue text.

Description

Describe the bug

The plot_predict() function generates the following error message
AttributeError: 'ARIMAResults' object has no attribute 'plot_predict'

Code Sample, a copy-pastable example if possible
from statsmodels.tsa.arima_model import ARIMA
model = ARIMA(df["Returns"], order=(1,1,1))
model_fit = model.fit()
print(model_fit.summary())

from statsmodels.graphics.tsaplots import plot_predict
model_fit.plot_predict()  # Causes AttributeError: 'ARIMAResults' object has no attribute 'plot_predict'
plt.show()

I'm using statsmodels version 0.14.0

According the website below, plot_predict should be change as follows.
model_fit.plot_predict()
to
plot_predict(model_fit)

Please confirm if this is correct as I see no mention of this on the statsmodels website .

https://stackoverflow.com/questions/73112516/arimaresults-object-has-no-attribute-plot-predict-error

Dominant language
Python
Stars
11.6k
Forks
3.6k
Avg merge
7h 37m
Merged PRs (30d)
96

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from statsmodels/statsmodels

All issues in statsmodels/statsmodels

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.