Autocorrelations |
Yule–Walker vs Burg Methods
RATS offers two algorithms for computing autocorrelations and partial autocorrelations. The "textbook" calculation is known as METHOD=YULE (for Yule-Walker). This starts by estimating the autocorrelation at lag k using
\(\hat \rho (k) = \frac{{\sum\limits_{t = k + 1}^T {\left( {{x_t} - \bar x} \right)\left( {{x_{t - k}} - \bar x} \right)} }}{{\sum\limits_{t = 1}^T {{{\left( {{x_t} - \bar x} \right)}^2}} }}\)
(Optionally without subtracting the mean). The Yule–Walker equations relate the autocorrelation coefficients to the partial autocorrelation coefficients by
\(\left[ {\begin{array}{*{20}{c}}{\rho (0)} & {\rho (1)} & {\rho (2)} & \cdots & {\rho (k - 1)} \\ {\rho (1)} & {\rho (0)} & {\rho (1)} & \cdots & {\rho (k - 2)} \\ \vdots & \vdots & \ddots & \ddots & \vdots \\ {\rho (k - 2)} & \cdots & {\rho (1)} & {\rho (0)} & {\rho (1)} \\ {\rho (k - 1)} & \cdots & {\rho (2)} & {\rho (1)} & {\rho (0)} \\ \end{array}} \right]\,\left[ {\begin{array}{*{20}{c}} {\pi (k,1)} \\ {\pi (k,2)} \\ \vdots \\ {\pi (k,k - 1)} \\ {\pi (k,k)} \\ \end{array}} \right] = \left[ {\begin{array}{*{20}{c}} {\rho (1)} \\ {\rho (2)} \\ \vdots \\ {\rho (k - 1)} \\ {\rho (k)} \\ \end{array}} \right]\)
where \(\rho(j)\) is the autocorrelation coefficient at lag j. \(\pi(k,j)\) is an estimate of the lag j coefficient on a k lag autoregression. The partial autocorrelation at lag k is given by \(\pi(k,k)\).
METHOD=BURG, on the other hand, computes the partial autocorrelations directly from the data, combining the forwards and backwards representations of an autoregression. See Burg(1967). RATS then backs out corresponding estimates of the autocorrelations.
The Yule–Walker equations become ill-conditioned if the series is non-stationary or close to it, producing imprecise estimates of the partial autocorrelations. Burg’s method is less sensitive to roots near the unit circle, and is, therefore, preferred. However, METHOD=YULE is more common, so in textbook replications, we typically use it to reproduce the reported results.
Standard Errors
In large samples, the variance of the autocorrelation estimators is approximately
\({\rm{Var}}\left( {\hat \rho (k)} \right) \approx \frac{1}{T}\left( {1 + 2\sum\limits_{j < k} {{{\hat \rho }^2}(j)} } \right)\)
where T is the number of observations. This is an increasing function of k. The variance of partial autocorrelations is approximately \(1/T\), independent of the values.
Q Tests
The Ljung–Box Q statistic for M lags is
\(Q = T\left( {T + 2} \right)\sum\limits_{j \le M} {\frac{{\hat \rho _j^2}}{{T - j}}} \)
Under appropriate circumstances, for a null hypothesis of no serial correlation Q is asymptotically distributed as a \({\chi ^2}\). RATS uses (M–DFC option) for the degrees of freedom. If the series are residuals from an ARIMA model, the DFC option should be set to the number of estimated ARMA parameters: BOXJENK saves this in the variable %NARMA. For other types of residuals, there is no known asymptotic distribution, so you shouldn’t rely upon this as a formal test.
Copyright © 2025 Thomas A. Doan