简体   繁体   中英

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: 在此处输入图片说明

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?

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())

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM