# Autocorrelation test for AR(p) (Breusch-Godfrey LM test)

I have a question regarding the test for the error term. As you know, in AR(p) model

$Y_t=\phi&space;_0&space;+&space;\phi&space;_1&space;Y_{t-1}&space;+...+\phi&space;_p&space;Y_{t-p}+u_t&space;\&space;\&space;where&space;\&space;u_t~iid(0,\sigma&space;^2)$

The error term must be i.i.d., so after the regression I want to see if there is no serial correlation in the error term.

The text book says Breusch-Godfrey's LM test is designed to test autoregression in the error term model such as $Y_t=\beta&space;_1&space;+&space;\beta&space;_2X_t+u_t&space;\&space;\&space;where&space;\&space;u_t=\alpha&space;u_{t-1}&space;+&space;\epsilon_t&space;,&space;\&space;\epsilon_t&space;\&space;WN(0,&space;\sigma^2)$

I wonder if we can use BG's LM test to test serial correlation of the error term in AR(p) model. Is it okay to counstruct the auxiliary regression as usual? By the way, I already know Ljung-Box's Q test.

(Before applying serial correlation tests to the residuals, you want to visually inspect the residuals for whiteness---look at the sample ACF and PACF. Serial correlation test statistics are often some kind of transformations of the sample ACF.)

...in AR(p) model..The error term must be i.i.d...

That statement is not correct. The i.i.d. condition is not required for ARIMA models, and also more strict than the null hypothesis of a large sample serial correlation test. In large sample, typically you would not expect to be able to distinguish between i.i.d. and covariance-stationary white noise processes.

The text book says Breusch-Godfrey's LM test is designed to test autoregression in the error term model such as $$Y_t = \beta_1 + \beta_2 X_t + u_t...$$...I wonder if we can use BG's LM test to test serial correlation of the error term in AR(p) model.

Yes. The asymptotic distribution under the Breusch-Godfrey null hypothesis obtains under the condition $$E[u_t X_t] = 0$$. Under this condition and stationarity, the residuals $$\hat{u}_t$$ approximate $$u_t$$ in large sample and the F-statistic of the auxiliary regression has the usual $$\chi^2$$-distribution.

With lagged dependent variable---e.g. $$X_t = Y_{t-1}$$, and the model is AR(1) $$Y_t = \beta_1 + \beta_2 Y_{t-1} + u_t,$$ under the null that $$u_t$$ has no serial correlation, then $$E[u_t Y_{t-1}] = 0$$. The point here is that the time series model is correctly specified under the null.

• I realized that I need to study more lol. Anyway, it helped a lot. Thanks! Sep 20, 2020 at 9:01

Yes you can use Breusch–Godfrey (BG) test for autocorrelation also in AR(p) models and dynamic models in general (see Verbeek Guide to Modern Econometrics where BG is applied to dynamic models in some examples - one of such examples is on page 142 in the 4th ed). As a matter of fact BG test is, generally speaking, the preferred test for autocorrelation in AR models and dynamic models (see Maddala Introduction to Econometrics).

Furthermore, actually Ljung-Box's Q test should not be used for testing AR processes or other dynamic models with lagged dependent variable. The reason for that is that this test is in the models with lagged dependent variable biased towards the null hypothesis. This is because in such models the Ljung-Box's Q test no longer has asymptotically $$\chi^2$$ distribution (see the Maddala textbook above for further discussion of this issue).

• "...actually Ljung-Box's Q test should not be used for testing AR processes or other dynamic models with lagged dependent variable. The reason for that is that this test is in the models with lagged dependent variable biased towards the null hypothesis..."---if I am reading you correctly, that statement is not right. Applying the Q test to the residuals of a, say, fitted AR(p) model, is a standard test for model adequacy. Sep 19, 2020 at 14:01
• @Michael well I dont think Maddala is wrong - in that case it must be an example of bad practice. Actually in response to your comment I tried to search more info on this issue outside the Maddala textbook and I found this issue being mentioned on cross-validated: See here stats.stackexchange.com/questions/212255/… here stats.stackexchange.com/questions/148004/…
– 1muflon1
Sep 19, 2020 at 14:08
• – 1muflon1
Sep 19, 2020 at 14:08
• I also noticed that one of the cross-validated links also mentions Maddala but also provides more sources so I dont think its just case of Maddala being wrong
– 1muflon1
Sep 19, 2020 at 14:12
• @Michael it is discussed in chapter 6.7 "Tests for serial correlation in models with lagged dependent variables" 257-259 and also later in chapters 13.5 in 3rd edition.
– 1muflon1
Sep 19, 2020 at 14:57