# Testing for serial correlation with General Regressors

This is from Introductory Econometrics (Wooldridge) 5th Edition page 420.

Consider: $$y_t =\beta_0 +\beta_1 x_{1t}+\beta_2 x_{2t}+...+\beta_k x_{kt}+u_t$$

where $$Cov(u_t, x_{jt})=0$$ for all $$j$$ but perhaps $$Cov(u_t, x_{jt-1}) \ne 0$$ for some $$j$$. We are concerned about autocorrelation, $$u_t =\rho u_{t-1}+v_t$$

To test for autocorrelation, the method proposed in-text is:

(1) Estimate the regression equation of interest and obtain residuals, $$\hat{u_t}$$.

(2) Run the regression: $$\hat{u_t}=\delta_0 +\delta_1 \hat{u}_{t-1}+\delta_2 x_{1t}+...+\delta_{k+1} x_{kt} +\varepsilon_t$$

(3) Perform a standard t-test for significance of $$\delta_1$$.

My question is, why do we need to include the x variables in the regression from step 2? It is a property of OLS that regressors are uncorrelated with estimated residuals.

The text says the inclusion is because of the potential failure of strict exogeneity (i.e., because $$Cov(u_t, x_{jt-1}) \ne 0$$) and that including the $$x$$ is necessary to attain a correct t-distribution of our t-stat. This is stated without justification or proof.

What is the underlying math of this idea?

• what sort of proof you are looking for? The auxiliary regression (step 2) is regression like any other regression so the Gauss-Markov assumptions must hold, if you do not control for $\mathbf{x}$ then you will have omitted variable bias since some of the error is explained by $\mathbf{x}$. I guess one can provide proof for why the GM assumptions are needed but I feel that is not what you are looking for
– 1muflon1
Jan 5 at 17:23
• that procedure seems odd to me because of the following: Suppose that that $u_t = \rho u_{t-1} + v_t$ does hold. Then this implies ( atleast according to the problem statement ) that $Cov(u_t, x_{j (t-1)}) \neq 0$. But it also implies that $Cov(u_{t-1}, x_{j (t-1)}) \neq 0$ which is the same as $Cov(u_t, x_{j t}) \neq 0$. But $Cov(u_t, x_{j t})$ was assumed to be zero in the first place !!!! Wooldridge of course knows what he's talking about so I must be missing something. Jan 5 at 17:43
• @1muflon1. I am not convinced there is OVB. $x$ is uncorrelated with $\hat{u}_t$ as a property of $\hat{u}_t$ being residuals from a regression of $y$ on $x$. If a variable is uncorrelated with the outcome, it can't cause OVB. Jan 6 at 8:22
• @mark leeds: A serially correlated error term does not imply anything regarding the dependence between $u_t$ and $x_s$ and is compatible with either $cov(u_t,x_s)=0$ or $cov(u_t,x_s) \neq 0$ for any subscript $s.$ Jan 7 at 18:44
• @mark leeds: correlation is not "transitive" in the sense that if A is correlated with B and B is correlated with C, then A is not necessarily correlated with C. Consider for instance the case of $X$ endogenous, so that $cov(X,u) \neq 0$, wlg take $cov(X,u) > 0$. A good instrument $Z$ is typically such that $cov(X,Z) >0$ (or the other way round, but correlated with $X$) and such that $cov(u,Z)=0$. So $u$ is correlated with $X$ and $X$ is correlated with $Z$, but this does not imply that $u$ is correlated with $Z$. The textbook of Wooldridge is an excellent reference. Jan 8 at 16:31

$$\hat{u}_{t}$$ is uncorrelated with $$X_{t}$$ by properties of OLS residuals.

is sample-dependent, in the sense that OLS normal equation only says $$\sum_{t=1}^{T}X_{t}\hat{u}_{t}=0$$, meaning the full statement should be

$$\{\hat{u}_{t}\}_{t=1}^{T}$$ is uncorrelated with $$\{X_{t}\}_{t=1}^{T}$$ by properties of OLS residuals.

But what is the value $$\sum_{t=2}^{T}X_{t}\hat{u}_{t}$$ or $$\sum_{t=3}^{T}X_{t}\hat{u}_{t}$$? I have no idea. As a result, will $$\{\hat{u}_{t}\}_{t=2}^{T}$$ and $$\{X_{t}\}_{t=2}^{T}$$, $$\{\hat{u}_{t}\}_{t=3}^{T}$$ and $$\{X_{t}\}_{t=3}^{T}$$ still be uncorrelated? I don't think so.

Now go back to your question. The general auxiliary regression for testing up to $$p$$-th order auto correlation is $$\hat{u}_{t}=\gamma^{\top}X_{t}+\sum_{j=1}^{p}\alpha_{j}\hat{u}_{t-j}+\varepsilon_{t}.$$ Since you include the lag terms of $$\hat{u}_{t}$$, which forces the sample indices of above regression equation to be $$t=p+1,p+2,\ldots,T$$. As mentioned before, generally, this will cause the regression result of $$\gamma$$ deviating from 0. (Although under null $$\mathbb{E}[u_{t}|X_{t},u_{t-1},\ldots,u_{t-p}]=0$$, these coefficients should converge to 0, but that's exactly what we are testing here.)

You can also verify it by a simple numerical experiment. Run a simple OLS regression, then i) regress $$\hat{u}_{i}$$ on $$X_{i}$$ using all the samples, you will get 0. ii) do the same regression but delete the first sample $$\hat{u}_{1}$$ and $$X_{1}$$, the result is no longer 0.

To cut a long story short, in the auxiliary regression, omitting $$X_{t}$$ won't cause inconsistency, but will contaminate the asymptotical distribution, hence the inference.

If we use $$u_{t}$$ in the regressor, then your claim is true, omitting $$X_{t}$$ is totally fine. However, the situation becomes different when we replace $$u_{t}$$ by $$\hat{u}_{t}$$.

Denote the original regression as $$y_{t}=\beta^{\top}X_{t}+u_{t},$$ under contemporaneous exogeneity, the infeasible auxiliary regression is $$u_{t}=\tilde{\delta} u_{t-1}+\tilde{\varepsilon}_{t}.$$ Since $$u_{t}$$ is not observable, we replace them by $$\hat{u}_{t}$$. Note that $$\hat{u}_{t}=u_{t}-(\hat{\beta}-\beta)^{\top}X_{t}$$, therefore despite the true parameter before $$X_{t}$$ was exactly 0, now it becomes weird $$\hat{u}_{t}=-(\hat{\beta}-\beta)^{\top}X_{t}+\delta\hat{u}_{t-1}+\varepsilon_{t}.$$ This equation is kind of beyond traditional econometric setting since the pseudo-true value $$(\hat{\beta}-\beta)$$ itself is changing and converging to 0. For now, let's first take sample size as fixed.

By direct computation, if $$X_{t}$$ is omitted in above regression, we have $$\hat{\delta}=\delta-A_{T}+(\sum_{t=2}^{T}\hat{u}_{t-1}^{2})^{-1}\sum_{t=2}^{T}\hat{u}_{t-1}\varepsilon_{t}$$, where the bias term of $$\hat{\delta}$$ is $$A_{T}=\biggl(\frac{1}{T}\sum_{t=2}^{T}\hat{u}_{t-1}^{2}\biggr)^{-1}\frac{1}{T}\sum_{t=2}^{T}\hat{u}_{t-1}X_{t}^{\top}(\hat{\beta}-\beta).$$

Now let's see what happens when $$T\to\infty$$, follow some standard procedure, we have \begin{align*} \frac{1}{T}\sum_{t=2}^{T}\hat{u}_{t-1}^{2}&=\mathbb{E}[u_{t}^{2}]+o_{p}(1)\\ \frac{1}{T}\sum_{t=2}^{T}\hat{u}_{t-1}X_{t}^{\top}&=\mathbb{E}[u_{t-1}X_{t}^{\top}]+o_{p}(1)\\ \sqrt{T}(\hat{\beta}-\beta)&\overset{\mathcal{L}}{\to}Z_{1}. \end{align*} Combine above result, the bias term* $$A_{T}=O_{p}(1)O_{p}(1)O_{p}(T^{-1/2})=\color{red}{O_{p}(T^{-1/2})},$$ which indicates $$\hat{\delta}$$ is still consistent. The problem arises when we apply the traditional $$t$$-test for $$\delta$$, CLT gives $$\sqrt{T}(\hat{\delta}-\delta+A_{T})\overset{\mathcal{L}}{\to}Z_{2}.$$ Here $$Z_{2}$$ is the normal distribution that $$t$$-test based on. However, when normalized by $$\sqrt{T}$$, the bias term $$A_{T}$$ will show up in the limiting distribution of $$\sqrt{T}(\hat{\delta}-\delta)$$ since $$\sqrt{T}A_{T}=O_{p}(1)$$, hence the $$t$$-test no longer works.

*: If you strengthen contemporaneous exogeneity $$\mathbb{E}[u_{t}|X_{t}]$$ to strict exogeneity $$\mathbb{E}[u_{t}|X_{1},\ldots,X_{T}]=0$$, that $$X_{t}$$ is not allowed to be correlated with past innovation, then $$A_{T}=o_{p}(T^{-1/2})$$ since the second term becomes $$o_{p}(1)$$, and $$t$$-test is still valid. This is what the textbook says.

• This helps a lot. So the concept is that the regression in step (2) excludes the first observation? Feb 7 at 9:12
• Exactly. You see the first available regression sample would be $\hat{u}_{2}=\delta_{0}+\delta_{1}\hat{u}_{1}+\cdots$, on the LHS, we can't use $\hat{u}_{1}$ as dependent variable, since otherwise RHS will contain a non-existing term $\hat{u}_{0}$.
– Q9y5
Feb 7 at 11:49
• Okay, I understand that, but a questions still lingers. If $x_t$ is correlated with $u_t$, then our original OLS estimates are biased anyway. I feel like this entire procedure relies on contemporaneous exogeneity, in which case there is a theoretical reason that omitting $x_t$ can't cause bias in the step 2 regression. Am I missing something? Feb 7 at 12:38
• @MichaelGmeiner See my new updates. The point is noting that $\mathbb{E}[\hat{u}_{t}X_{t}]=\mathbb{E}[u_{t}X_{t}]-\mathbb{E}[(\hat{\beta}-\beta)^{\top}X_{t}]$. This means even under contemporaneous exogeneity, the "true parameter" of regressing $\hat{u}_{t}$ on $X_{t}$ is no longer 0 but something converging to 0 at a root-$T$ rate. Omitting this kind of variable won't cause inconsistency but causes problems in doing inference.
– Q9y5
Feb 8 at 5:38

My understanding is that the classical test for serial correlation is actually conditional to the validity of the strict exogeneity assumption: $$E[u_t|X]=0,$$ or, as the requirement applies to any $$t$$, $$E[u_{t-1}|X]=0$$. This is a shortcoming, because violations of the strict exogeneity assumption usually generates autocorrelation (we may find evidence for serially correlated errors because strict exogeneity is actually violated).

The classical serial correlation approach considers that a type of conditional mean independence wrt $$X$$ holds: $$E[u_t|X,u_{t-1}]=E[u_t|u_{t-1}]=\rho u_{t-1}.$$ The extension discussed by Wooldridge considers instead that: $$E[u_t|X,u_{t-1}]=\rho u_{t-1}+x_t^T\delta.$$ This does not imply (nor require) strict exogeneity, by the law of iterated expectations, we have $$E[u_t|X] \neq 0$$ in general, and OLS estimates in the model $$y_t=x_t^T\beta +u_t$$ are biased for $$\beta$$ in this case.

• Thank you for the answer. I am a little surprised Wooldridge does this though, because $\hat{u_t}$ is uncorrelated with $x_t$ by properties of OLS residuals. Is it more the principle that the regression is motivated by the theory of the true error, $u_t$? And if the theory is that $x_t$ may be correlated with $u_t$, then contemporaneous exogeneity fails - which really seems like an odd assumption to base a test on. Jan 7 at 13:25
• I agree with you on the fact that, if there is violation of strict exogeneity, then it is better (in order to avoid inconsistent OLS estimates), to obtain the $\widehat{u}_t$ using IV or GMM. What happens if $\widehat{u}_t$ is obtained after an inconsistent OLS? Is the approach still valid? Hmm. I cannot give a definite answer, but just note that strict exogeneity $E[u_t|X]=0$ does not imply that $E[u_t|X,u_{t-1}]=0.$ So it might still be justified to consider OLS residuals... Jan 7 at 14:18
• @Bertrand: You clearly know what you're talking about but I was just wondering if your answer addresses any of my confusion regarding the initial assumption then becoming invalid if the test for serial correlation rejects the null ? Thanks and, if not, don't worry about it. I've always found Wooldridge's writings to be somewhat confusing so I'll just remain confused !!!!!!!!! Jan 7 at 14:50