pythontime-seriesstatsmodelsarimaautoregressive-models

Removing coefficient from an AR(MA) model with statsmodels in python


After implementing the following lines of code in my script

model = ARMA(dfData["GDP_QGR"], order=(3,0))
    model_fit = model.fit()
    print(model_fit.summary())

I obtained these results: enter image description here

As I'm using a 10% significance level, the second coefficient is not significant. My issue is that I do not know how to remove it, while still keeping the other coefficients. I can't use an ARMA(2,0) model as it would delete the last coefficient, not the one in red. Does anyone know how I can solve this?


Solution

  • You can do this using the tsa.arima.ARIMA model:

    model = sm.tsa.arima.ARIMA(dfData["GDP_QGR"], order=([1, 3], 0, 0))
    model_fit = model.fit()
    print(model_fit.summary())