简体   繁体   English

使用python中的statsmodels从AR(MA)模型中删除系数

[英]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.由于我使用的是 10% 的显着性水平,因此第二个系数不显着。 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.我不能使用 ARMA(2,0) 模型,因为它会删除最后一个系数,而不是红色的系数。 Does anyone know how I can solve this?有谁知道我该如何解决这个问题?

You can do this using the tsa.arima.ARIMA model:您可以使用tsa.arima.ARIMA模型执行此操作:

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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