I’m currently reading a time series book and trying to code along with the book but the output of my ljung-box test and the book is different. The book outputs shows the p-value of each lags while mine shows the output of lb_pvalue. Why does my output returns lb_pvalue instead of output of the p-values of each lag? Is there something I did wrong?
model = SARIMAX(train['bandwidth_diff'], order=(2,0,2), simple_differencing=False)
model_fit = model.fit(disp=False)
print(model_fit.summary())
model_fit.plot_diagnostics(figsize=(10,8))
residuals = model_fit.resid
lbvalue, pvalue = acorr_ljungbox(residuals, np.arange(1,11,1))
print(pvalue)
Andrewyapppp is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.