'Create an ARIMA(5, d, q) without the AR(3) term in Python
I've created an ARIMA model where the AR term goes up to 5. However, I need to remove the AR(3) term. I was wondering how to do so, if possible, in Python using the statsmodels package. I know the current model is in Eviews where they have achieved this, but when replicating it in Python I am unable to do this.
This is what I have so far:
from statsmodels.tsa.arima.model import ARIMA
model = ARIMA(df, order=(5, 1, 2))
model_fit = model.fit()
print(model_fit.summary())
Solution 1:[1]
You can do this with order=([1, 2, 4, 5], 1, 2), i.e.:
from statsmodels.tsa.arima.model import ARIMA
model = ARIMA(df, order=([1, 2, 4, 5], 1, 2))
model_fit = model.fit()
print(model_fit.summary())
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | cfulton |
