我已经在 python 中使用代码实现了一个自动 SARIMA 模型:
import pmdarima as pm
smodel = pm.auto_arima(df,start_p=1,start_q=1,test='adf',max_p=3,max_q=3,m=12,start_P=0,seasonal=True,d=1,D=1,trace=True,error_action='ignore',suppress_warnings=True,stepwise=True)
smodel.summary()
结果表明,最佳模型具有截距,如图所示。 enter image description here 但是当我尝试使用代码拟合最佳模型 (SARIMAX(0,1,2)x(2,12)) 时:
from statsmodels.tsa.statespace.sarimax import SARIMAX
model = SARIMAX(df,order=(0,2),seasonal_order=(2,12))
model_fit = model.fit(disp= False)
print(model_fit.summary())
我在没有截距的情况下获得了结果,如图所示。 enter image description here。
我想知道为什么拦截不再出现,以及如何包含它。
谢谢。