Power Comparisons of Five Most Commonly Used Autocorrelation Tests

In regression analysis, autocorrelation of the error terms violates the ordinary least squares assumption that the error terms are uncorrelated. The consequence is that the estimates of coefficients and their standard errors will be wrong if the autocorrelation is ignored. There are many tests for autocorrelation, we want to know which test is more powerful. We use Monte Carlo methods to compare the power of five most commonly used tests for autocorrelation, namely Durbin-Watson, Breusch-Godfrey, Box–Pierce, Ljung Box, and Runs tests in two different linear regression models. The results indicate the Durbin-Watson test performs better in the regression model without lagged dependent variable, although the advantage over the other tests reduce with increasing autocorrelation and sample sizes. For the model with lagged dependent variable, the Breusch-Godfrey test is generally superior to the other tests.


Tests for Autocorrelation
We give a short description of the five methods of testing for Autocorrelation.

Durbin-Watson test
The most frequently used statistical test for detecting autocorrelation is the Durbin-Watson test (Durbin and Watson, 1950, 1951, 1971; Greene, 2018) which is defined based on the ordinary least squares residuals.
If is the residual associated with the observation at time , then the Durbin-Watson -statistic is where is the number of observations.
The value of Durbin Watson -statistic in Equation (1) always lies between 0 and 4. Harvey (1990) notes that, for large sample sizes, the Durbin-Watson test statistic is approximately normally distributed with mean = 2 and variance = 4/ . Durbin-Watson -statistic is not applicable when lagged dependent variables are included in the explanatory variables. Breusch (1978) and Godfrey (1978) (see also Asteriou and Hall, 2017) have developed a test of autocorrelation that is more flexible, covering autocorrelation of higher orders and applicable whether or not the regressors include lags of the dependent variable. Using simple regression model,

Box-Pierce test
Box and Pierce (1970) (see also Greene, 2018) introduced the portmanteau statistic where is the sample size, is the sample autocorrelation at lag , and ℎ is the number of lags being tested. Under 0 of no autocorrelations the statistic in Equation (4) follows a (ℎ) 2 . Box-Pierce test is not valid when lagged dependent variables exist in the regressor.

Ljung-Box test
Another test for assessing autocorrelation is the Ljung and Box (1978) (see also Verbeek, 2017). Ljung and Box (1978) modified Box and Pierce (1970) test statistic by (5) where is the sample size, is the sample autocorrelation at lag , and ℎ is the number of lags being tested. Under 0 of no autocorrelations the statistic follows a (ℎ) 2 . Hyndman and Athanasopoulos (2013) suggest using ℎ = (10, /5)for Equation (5). Ljung-Box test is not valid when lagged dependent variables exist in the regressor.

Runs test
Runs test of randomness (Wald and Wolfowitz, 1943; see also Gujarati and Porter, 2009) is a statistical test that is used to know the randomness in data. Runs test of randomness is an alternative test to test autocorrelation in the residuals (Geary, 1970). If there is no autocorrelation, then the residuals are distributed randomly. A run is defined as a series of consecutive positive (or negative) values. Let = total number of observations, 1 = number of positive residuals, 2 = number of negative residuals, = 1 + 2 , and = number of runs. Asuming that 1 > 10 and 2 > 10, then under the null hypothesis that the successive residuals are random, the number of runs is asymptotically normally distributed.
The test statistic is .

Monte Carlo method
Power comparisons of tests for autocorrelation are made by using Monte Carlo method for simulation. We use R for Windows (R Core Team, 2019) for doing the simulation. We carried out simulations for six different sample sizes We compute the power of the test as the proportion of times we correctly reject the null hypothesis.
The following are the simulation steps: 1. Generate the sample data for the model without lagged dependent variable and the model with a lagged dependent variable.

Results and Conclusion
Tables 2 and 3 respectively report the powers of the five autocorrelation tests for model without lagged dependent variabel and model with lagged dependent variable.
The difference of the power of the tests becomes more apparent when the comparison is carried out graphically. Examining the results in Figure 1 and Table 2 reveal that the Durbin-Watson test performs better in the model without lagged dependent variable, although the advantage over the Breusch-Godfrey, Box-Pierce, Ljung Box, and Runs tests reduce with increasing autocorrelation and sample size .
For the model with lagged dependent variable, Figure 2 and Table 3 reveal that the Breusch-Godfrey test is generally superior to the other tests. The Durbin-Watson test, Box-Pierce, Ljung Box, and Runs tests have very low power except for very high correlations. Note that the Durbin-Watson, Box-Pierce, Ljung Box tests are not valid when lagged dependent variables exist in the regressor.
In conclusion, the Durbin-Watson test performs better in the regression model without lagged dependent variable, although the advantage over the other tests reduce with increasing autocorrelation and sample sizes. For the model with lagged dependent variable, the Breusch-Godfrey test is generally superior to the other tests.