ARIMA models : plot_diagnostics, what's meaning of residuals of our model
Asked Answered
G

1

7

I am studying the ARIMA models with the following tutorial: https://www.digitalocean.com/community/tutorials/a-guide-to-time-series-forecasting-with-arima-in-python-3#step-5-—-fitting-an-arima-time-series-model

After I fit the model with Step 5 — Fitting an ARIMA Time Series Model with following code:

mod = sm.tsa.statespace.SARIMAX(y,
                                order=(1, 1, 1),
                                seasonal_order=(1, 1, 1, 12),
                                enforce_stationarity=False,
                                enforce_invertibility=False)

results = mod.fit()

print(results.summary().tables[1])

and plot

results.plot_diagnostics(figsize=(15, 12))
plt.show()

I don't know the meaning: the residuals of our model are uncorrelated and normally distributed with zero-mean. I want to know what's the residual in the model, is the meaning that the residual is the difference between true value and predict value.

Why the author set the enforce_stationarity is False since the ARIMA mode need data stationarity, what's meaning of enforce_stationarity and enforce_invertibility?

 enforce_stationarity=False,
 enforce_invertibility=False

If possible, could you explain in detail. thanks!

Githens answered 29/5, 2017 at 15:19 Comment(0)
S
4

Residual indeed is the difference between true and predicted value. If there are correlations between residuals - there is information left in the residuals which should be used in computing forecasts. If the residuals have a mean other than zero, then the forecasts are biased. For instance if we have a constantly growing residual like (... -0.3, -0.2, 0.1, 0, 0.1, 0.2, 0.3, ... and so on, the mean will be 0) it means that our model does not fully depict the process.

Parameters: If you look at the package documentation you will see that these parameters are used to ENFORCE stationarity or invertibility. If the data is stationary and the AR parameters are chosen correctly (since you should have done some previous data preprocessing) why should we do it again? Same stands for invertibility.

Shortcircuit answered 29/5, 2017 at 15:36 Comment(2)
thanks @papadoble151. Could you tell me the meaning: there is information left in the residuals which should be used in computing forecasts. I mean what's ' there is information left '. In addtion, I have updated my question about this model, could you help me understand it. Thanks!Githens
thanks @papadoble151, I will accept you answer. By the way, could you answer me another question:#44236058Githens

© 2022 - 2024 — McMap. All rights reserved.