<p>(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.)</p>
<blockquote>
<p>...in AR(p) model..The error term must be i.i.d...</p>
</blockquote>
<p>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.</p>
<blockquote>
<p>The text book says Breusch-Godfrey's LM test is designed to test
autoregression in the error term model such as <span class="math-container">$Y_t = \beta_1 +  \beta_2 X_t + u_t...$</span>...I wonder if we can use BG's LM test to test serial
correlation of the error term in AR(p) model.</p>
</blockquote>
<p>Yes. The asymptotic distribution under the Breusch-Godfrey null hypothesis obtains under the condition <span class="math-container">$E[u_t X_t] = 0$</span>. Under this condition and stationarity, the residuals <span class="math-container">$\hat{u}_t$</span> approximate <span class="math-container">$u_t$</span> in large sample and the F-statistic of the auxiliary regression has the usual <span class="math-container">$\chi^2$</span>-distribution.</p>
<p>With lagged dependent variable---e.g. <span class="math-container">$X_t = Y_{t-1}$</span>, and the model is AR(1)
<span class="math-container">$$
Y_t = \beta_1 +  \beta_2 Y_{t-1} + u_t,
$$</span>
under the null that <span class="math-container">$u_t$</span> has no serial correlation, then <span class="math-container">$E[u_t Y_{t-1}] = 0$</span>. The point here is that the time series model is correctly specified under the null.</p>

CC BY-SA 4.0
2020-09-20T09:01:35.370Z
I realized that I need to study more lol. Anyway, it helped a lot. Thanks!
modern
CC BY-SA 4.0
2020-09-19T13:50:06.893Z
2020-09-19T14:07:52.330Z
2020-09-19T14:07:52.330Z
Michael
<p>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).</p>
<p>Furthermore, actually Ljung-Box's Q test should <strong>not</strong> 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 <span class="math-container">$\chi^2 $</span> distribution (see the Maddala textbook above for further discussion of this issue).</p>

CC BY-SA 4.0
2020-09-19T14:01:30.227Z
"...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.
Michael
CC BY-SA 4.0
2020-09-19T14:08:19.003Z
@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 https://stats.stackexchange.com/questions/212255/ljung-box-test-for-arma-residuals-is-my-arma-model-fine 

here https://stats.stackexchange.com/questions/148004/testing-for-autocorrelation-ljung-box-versus-breusch-godfrey
1muflon1
CC BY-SA 4.0
2020-09-19T14:08:21.893Z
and here https://stats.stackexchange.com/questions/6455/how-many-lags-to-use-in-the-ljung-box-test-of-a-time-series/205262#205262
1muflon1
CC BY-SA 4.0
2020-09-19T14:12:09.830Z
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
CC BY-SA 4.0
2020-09-19T14:25:37.093Z
I see, interesting. The residuals that enter the Q-statistic is computed using the entire sample, so exogeneity w.r.t. past values at the population level is insufficient. (Statistics literature on time series seems to not have taken notice of this point.) Do you happen to have specific page citation for Maddala?
Michael
CC BY-SA 4.0
2020-09-19T14:57:21.660Z
@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
CC BY-SA 4.0
2020-09-20T09:08:06.357Z
Oh, I didn't know in that detail. If the library has that book, I will look into it. Thanks for recommending me a good source.
modern
CC BY-SA 4.0
2020-09-19T09:22:53.073Z
2020-09-19T13:04:27.607Z
2020-09-19T13:04:27.607Z
1muflon1
<p>I have a question regarding the test for the error term.
As you know, in AR(p) model</p>
<p><img src="https://latex.codecogs.com/gif.latex?Y_t=%5Cphi&space;_0&space;&plus;&space;%5Cphi&space;_1&space;Y_%7Bt-1%7D&space;&plus;...&plus;%5Cphi&space;_p&space;Y_%7Bt-p%7D&plus;u_t&space;%5C&space;%5C&space;where&space;%5C&space;u_t~iid(0,%5Csigma&space;%5E2)" title="Y_t=\phi _0 + \phi _1 Y_{t-1} +...+\phi _p Y_{t-p}+u_t \ \ where \ u_t~iid(0,\sigma ^2)" /></p>
<p>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.</p>
<p>The text book says Breusch-Godfrey's LM test is designed to test autoregression in the error term model such as
<img src="https://latex.codecogs.com/gif.latex?Y_t=%5Cbeta&space;_1&space;&plus;&space;%5Cbeta&space;_2X_t&plus;u_t&space;%5C&space;%5C&space;where&space;%5C&space;u_t=%5Calpha&space;u_%7Bt-1%7D&space;&plus;&space;%5Cepsilon_t&space;,&space;%5C&space;%5Cepsilon_t&space;%5C&space;WN(0,&space;%5Csigma%5E2)" title="Y_t=\beta _1 + \beta _2X_t+u_t \ \ where \ u_t=\alpha u_{t-1} + \epsilon_t , \ \epsilon_t \ WN(0, \sigma^2)" /></p>
<p>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.</p>
<p>Thanks, in advance.</p>

<autoregressive>
Autocorrelation test for AR(p) (Breusch-Godfrey LM test)
modern
# Autocorrelation test for AR(p) (Breusch-Godfrey LM test)

(Asked by: username_0 on 2020-09-19)

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

![](https://latex.codecogs.com/gif.latex?Y_t=%5Cphi&space;_0&space;+&space;%5Cphi&space;_1&space;Y_%7Bt-1%7D&space;+...+%5Cphi&space;_p&space;Y_%7Bt-p%7D+u_t&space;%5C&space;%5C&space;where&space;%5C&space;u_t~iid(0,%5Csigma&space;%5E2) "Y_t=\phi _0 + \phi _1 Y_{t-1} +...+\phi _p Y_{t-p}+u_t \ \ where \ u_t~iid(0,\sigma ^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
![](https://latex.codecogs.com/gif.latex?Y_t=%5Cbeta&space;_1&space;+&space;%5Cbeta&space;_2X_t+u_t&space;%5C&space;%5C&space;where&space;%5C&space;u_t=%5Calpha&space;u_%7Bt-1%7D&space;+&space;%5Cepsilon_t&space;,&space;%5C&space;%5Cepsilon_t&space;%5C&space;WN(0,&space;%5Csigma%5E2) "Y_t=\beta _1 + \beta _2X_t+u_t \ \ where \ u_t=\alpha u_{t-1} + \epsilon_t , \ \epsilon_t \ WN(0, \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.

Thanks, in advance.

**Tags:** autoregressive

---

## 2 answers

### Answer by username_1 on 2020-09-19. Score: 1 | Accepted answer

(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.

> **Comments:**
> **username_0**: I realized that I need to study more lol. Anyway, it helped a lot. Thanks!  

---

### Answer by username_2 on 2020-09-19. Score: 1

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).

> **Comments:**
> **username_1**: "...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.  
> **username_2**: @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 https://stats.stackexchange.com/questions/212255/ljung-box-test-for-arma-residuals-is-my-arma-model-fine   here https://stats.stackexchange.com/questions/148004/testing-for-autocorrelation-ljung-box-versus-breusch-godfrey  
> **username_2**: and here https://stats.stackexchange.com/questions/6455/how-many-lags-to-use-in-the-ljung-box-test-of-a-time-series/205262#205262  
> **username_2**: 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  
> **username_1**: I see, interesting. The residuals that enter the Q-statistic is computed using the entire sample, so exogeneity w.r.t. past values at the population level is insufficient. (Statistics literature on time series seems to not have taken notice of this point.) Do you happen to have specific page citation for Maddala?  
> **username_2**: @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.  
> **username_0**: Oh, I didn't know in that detail. If the library has that book, I will look into it. Thanks for recommending me a good source.  

---

