The Ljung-Box test is widely used to test for autocorrelation remaining in the residuals after fitting a model to a time series. In this post, I look at the degrees of freedom used in such tests.
The Ljung-Box test
Suppose an ARMA() model is fitted to a time series of length , giving a series of residuals <img src=“https://latex.codecogs.c …