Tutorials › Econometrics (Graduate) › Serial Dependence Diagnostics for Panel Scores

Panel Dependence and Inference · Tutorial 325 of 952

Serial Dependence Diagnostics for Panel Scores

Learn to read within-unit residual patterns, apply a panel serial-correlation test, and distinguish evidence of dependent errors from clues that the regression model needs revision.

Advanced 12 min read

What You'll Learn

  • Define within-unit residual autocorrelation and construct a panel residual autocorrelation plot.
  • Explain why differenced errors have a lag-one correlation of minus one-half when level errors are serially uncorrelated.
  • Carry out and interpret the Wooldridge test for serial correlation in a panel model.
  • Recognize the expected first-order pattern in differenced residuals and the role of the Arellano–Bond second-order test.
  • Distinguish diagnostic evidence about regression errors from evidence that the conditional mean may be misspecified.
  • Identify what a serial-correlation finding does and does not imply about inference.

Why Diagnose Serial Dependence in Panels?

Panel observations are ordered both by unit and by time. A residual for one unit in one period may therefore be related to that unit’s residual in a nearby period, even after accounting for the included regressors and unit effects. This within-unit serial dependence matters because it describes the remaining errors in the fitted model and can affect the uncertainty calculations used for inference.

A residual pattern is a diagnostic clue, not an automatic verdict on the error process. Serial-looking residuals may arise because errors are dependent, but they may also arise because the conditional mean is misspecified—for example, because a relevant trend or lagged predictor was omitted. A useful diagnosis combines plots, formal tests, and a substantive review of the regression specification.

Definition: In the panel regression \(y_{it}=x_{it}'\beta+a_i+u_{it}\), \(i\) indexes units and \(t\) indexes time. The disturbance \(u_{it}\) is the regression error after accounting for the stated conditional mean and unit effect; its fitted counterpart is the residual \(\hat u_{it}\). Within-unit serial correlation concerns dependence between \(u_{it}\) and \(u_{i,t-k}\) for the same unit \(i\) and some positive lag \(k\). It is distinct from dependence between different units.

The model must be specified before residuals can be interpreted. In particular, the conditional mean and any included unit or time effects should represent the assumptions of the analysis. A residual is an estimate of an error, not the error itself, and a visible residual pattern cannot by itself establish why the pattern occurred.

Reading Residual Autocorrelation Plots

Begin by plotting residuals against time separately for several units, or by displaying within-unit autocorrelation functions. A residual-versus-time plot can reveal persistent runs of positive or negative residuals, cycles, abrupt changes, or trends. An autocorrelation function summarizes the association between residuals separated by each lag. For example, a positive lag-one autocorrelation means that residuals at adjacent periods tend to have the same sign within units; a negative value means that opposite signs are more common.

One pooled lag-\(k\) summary, for a balanced panel, is the correlation of residual pairs \((\hat u_{it},\hat u_{i,t-k})\) collected within units. The pairs must not cross unit boundaries: the last observation for one unit is never paired with the first observation for another. Centering residuals within unit before calculating the summaries can help separate within-unit patterns from differences in average residual levels across units. For an unbalanced panel, use only observed within-unit pairs at each lag and report how many pairs contribute.

Worked Example: Interpreting a Within-Unit Residual ACF

Suppose a hypothetical unit has four consecutive fitted residuals, in outcome units, of \(1,-1,1,-1\). The residual mean is zero. Using the common descriptive ACF formula with the full sum of squares in the denominator, the lag-one estimate is

$$ \hat r(1)= \frac{\sum_{t=2}^{4}\hat u_t\hat u_{t-1}} {\sum_{t=1}^{4}\hat u_t^2} = \frac{(-1)(1)+(1)(-1)+(-1)(1)} {1^2+(-1)^2+1^2+(-1)^2} = -\frac{3}{4}=-0.750. $$

The negative value reflects the alternating signs: every adjacent pair has opposite signs. It is a descriptive result for this very short residual sequence, not a formal test and not strong evidence on its own. In an applied panel, inspect patterns across units and lags, and consider the number of available pairs before drawing a conclusion.

A pooled plot can conceal heterogeneity: some units may show positive autocorrelation, others negative, and still others little pattern. Conversely, a striking pattern in one short series may be unstable. Plotting a representative set of unit-specific series alongside pooled summaries is often more informative than relying on a single graph.

The Wooldridge Test for Panel Serial Correlation

A widely used test for first-order serial correlation in a panel regression is the Wooldridge test. Its reference null is that the idiosyncratic errors in the level model are serially uncorrelated. The test uses the relationship between adjacent first differences under that null. It is not a test that the raw differences have zero autocorrelation: even when level errors are uncorrelated, differencing creates a known negative adjacent relationship.

Test setup: Suppose the conditional mean is correctly specified and the level errors \(u_{it}\) have mean zero, constant variance \(\sigma^2\), and no serial correlation under \(H_0\). First-difference the model, estimate the differenced regression, and obtain residuals \(\hat v_{it}\), which estimate \(\Delta u_{it}=u_{it}-u_{i,t-1}\). Regress \(\hat v_{it}\) on \(\hat v_{i,t-1}\), without an intercept, using available adjacent pairs. The Wooldridge null is \(H_0:\rho=-1/2\), where \(\rho\) is the auxiliary-regression slope. A departure from \(-1/2\) is evidence against the null of serially uncorrelated level errors.

The test requires enough time observations to form adjacent differences and lagged pairs. Inference should reflect the panel design; a unit-clustered standard error for the auxiliary regression is a common choice when the number of units supports cluster-based large-sample inference. The resulting test is usually a \(t\)- or Wald test of the restriction \(\rho=-1/2\). A small p-value is evidence against that restriction under the test’s assumptions; it is not the probability that the null is true.

Why the Null Slope Is Minus One-Half

The reference value follows directly from the properties of first differences. Under the null, suppose \(u_{it}\) and \(u_{i,t-1}\) are uncorrelated, each has variance \(\sigma^2\), and errors at distinct times have zero covariance. Then \(\Delta u_{it}=u_{it}-u_{i,t-1}\) has variance \(2\sigma^2\). The preceding difference is \(\Delta u_{i,t-1}=u_{i,t-1}-u_{i,t-2}\); the two differences share \(u_{i,t-1}\) with opposite signs. Thus:

$$ \operatorname{Cov}(\Delta u_{it},\Delta u_{i,t-1})=-\sigma^2, \qquad \operatorname{Var}(\Delta u_{i,t-1})=2\sigma^2. $$

For a regression through the origin, the population slope of \(\Delta u_{it}\) on \(\Delta u_{i,t-1}\) is their covariance divided by the variance of the regressor. Therefore:

$$ \rho= \frac{\operatorname{Cov}(\Delta u_{it},\Delta u_{i,t-1})} {\operatorname{Var}(\Delta u_{i,t-1})} = \frac{-\sigma^2}{2\sigma^2} =-\frac12. $$

This derivation also explains a frequent diagnostic error: finding a negative lag-one pattern in differenced residuals does not, by itself, indicate serial correlation in level errors. Under the null, that negative pattern is expected.

Worked Example: Testing the Wooldridge Restriction

Suppose a hypothetical panel has 50 units observed for five periods. A correctly specified first-differenced regression produces residuals for the available adjacent-pair auxiliary regression. The no-intercept regression of \(\hat v_{it}\) on \(\hat v_{i,t-1}\) has estimated slope \(\hat\rho=-0.18\) and unit-clustered standard error \(SE(\hat\rho)=0.09\). Test \(H_0:\rho=-0.5\) against a two-sided alternative at \(\alpha=0.05\).

The test statistic compares the estimate with the null value, not with zero:

$$ t= \frac{\hat\rho-(-0.5)}{SE(\hat\rho)} = \frac{-0.18+0.50}{0.09} = \frac{0.32}{0.09} \approx 3.56. $$

Using a \(t\) reference distribution with approximately 49 degrees of freedom gives a two-sided p-value of about \(0.0008\). Since this is below \(0.05\), reject the null restriction in this hypothetical example. The result is evidence against serially uncorrelated level errors, conditional on the model and test assumptions. It does not show that a particular alternative error process is correct, nor does it prove that the regression’s conditional mean is correctly specified.

Dynamic Panels and Differenced-Residual Tests

In dynamic panel models estimated by difference GMM, serial-correlation diagnostics have a related but distinct interpretation. If level errors are serially uncorrelated, first-differenced errors are mechanically correlated at order one, as the derivation above shows. Consequently, evidence of first-order correlation in differenced residuals is generally expected. The crucial diagnostic is often the Arellano–Bond test for second-order serial correlation in differenced residuals: rejection can indicate that the level-error assumptions supporting the moment conditions are not credible.

The exact reference distribution and implementation depend on the estimator and its assumptions. Do not transfer the Wooldridge test’s \(-1/2\) auxiliary-regression restriction to an Arellano–Bond test, or treat these tests as interchangeable. For either approach, first state which residuals are being tested—level, first-differenced, or another transformation—and which null is appropriate for that transformation.

Errors, Scores, and Model Specification

The regression error and the estimating score answer related but different questions. In a linear regression, a unit-period score contribution for the slope parameter is commonly written \(s_{it}=x_{it}\hat u_{it}\). A score combines the residual with the regressors; its serial dependence concerns the contributions to estimation across time, not just the residual process. Residual autocorrelation is evidence about the fitted error pattern. Score dependence is relevant to the covariance of the estimator and can depend on both the residuals and the regressor sequence.

Neither diagnostic uniquely identifies the cause of a pattern. If an omitted time trend makes fitted residuals rise over time, a serial-correlation test may reject even if the underlying disturbances themselves are not serially correlated. The test is then detecting a failure of its null as applied to residuals from the stated model; it does not separate error dependence from conditional-mean misspecification on its own.

Worked Example: A Pattern That May Reflect Misspecification

Consider hypothetical residuals from one unit over five periods: \(-2,-1,0,1,2\), measured in the outcome’s units. Their mean is zero. The same descriptive lag-one calculation gives:

$$ \hat r(1)= \frac{(-1)(-2)+(0)(-1)+(1)(0)+(2)(1)} {(-2)^2+(-1)^2+0^2+1^2+2^2} = \frac{4}{10}=0.400. $$

The positive value indicates that adjacent residuals tend to move in the same direction in this series. One possible explanation is serially dependent errors. Another is a time trend omitted from the conditional mean: residuals that steadily increase are consistent with the model failing to account for a systematic change over time. The calculation establishes the pattern, not its cause. The next step is to review the specification and the data-generating context, then assess whether the diagnostic remains after a defensible model revision.

Practical Interpretation and Common Pitfalls

A serial-correlation diagnostic matters because a dependence pattern left unaccounted for can make standard errors and tests based on an inappropriate covariance model unreliable. A rejection does not automatically tell you which inference method to use; that choice depends on the panel’s asymptotic regime and the dependence assumptions. The test’s job is to provide evidence about the stated null, not to select a complete estimator or covariance procedure.

  • Wrong: “The differenced residuals are negatively correlated, so level errors must be serially correlated.” Correction: Under serially uncorrelated level errors, adjacent first differences have a correlation of \(-1/2\).
  • Wrong: “The test rejected, so the errors are definitely the source of the problem.” Correction: Rejection may reflect error dependence, an inadequate conditional mean, or both; inspect the specification and residual plots.
  • Wrong: “A non-significant test proves that there is no serial dependence.” Correction: Failure to reject is not proof of the null; limited time periods or noisy residuals can reduce power.
  • Wrong: “Lag residuals across the end of one unit and the start of another.” Correction: Form lags only within a unit, respecting its observed time order.
Key takeaway: Plot residuals in their within-unit time order, identify the exact residual transformation, and test the null appropriate to that transformation. Treat rejection as a diagnostic signal to examine both the error assumptions and the conditional mean—not as a stand-alone explanation.

Check Your Understanding

Use the definitions and results above to answer the following.

  1. Under serially uncorrelated level errors with common variance, why is the expected auxiliary-regression slope for adjacent first differences \(-1/2\)?
  2. A Wooldridge test reports a p-value of \(0.03\) at \(\alpha=0.05\). State the conclusion in terms of its null, without claiming that the null has a particular probability.
  3. Why must lagged residual pairs be formed within units rather than across adjacent rows of a stacked panel data set?
  4. A residual plot has a steady upward pattern over time. Give two possible explanations and explain why the plot alone cannot distinguish them.
  5. In a difference-GMM analysis, why is a second-order test on differenced residuals often more informative than simply noting first-order correlation?
Clinical Biostats