How to diagnose model fit

If the model captures the linear dependence across lags, then the residuals should resemble white noise.

In addition to inspecting the ACF to verify the absence of significant autocorrelation coefficients, the Ljung-Box Q statistic allows us to test the hypothesis that the residual series follows white noise. The null hypothesis is that all m serial correlation coefficients are zero against the alternative that some coefficients are not. The test statistic is computed from the sample autocorrelation coefficients, ρk, for different lags, k, and follows an Χ2 distribution:

As we will see, statsmodels provides information about the significance of coefficients for different lags, and insignificant coefficients should be removed. If the Q statistic rejects the null hypothesis of no autocorrelation, you should consider additional AR terms.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.139.82.23