*! version 1.0.0 09jun2026

Title

xttestpanel serial -- Serial-correlation tests for panel-data models

Syntax

xttestpanel serial [depvar indepvars] [if] [in]
[, model(fe|re) lags(#) graph]

Postestimation form (no varlist) reuses the last xtreg; see
the overview.

Description

xttestpanel serial tests the null of no serial correlation in the
idiosyncratic errors. From the FE (default) or RE residuals it reports three tests:

o Baltagi-Li LM - a two-sided score test for AR(1)/MA(1) serial
correlation in the remainder disturbances, in the spirit of Baltagi & Li (1995) and
Baltagi, Jung & Song (2010); asymptotically chi2(1).

o Born-Breitung / Wooldridge robust - the lag-1 score test
standardised with a by-unit (cluster-robust) variance, so it is robust to
heteroskedasticity and cross-unit heterogeneity; chi2(1).

o Bin Chen (2022) robust portmanteau - a cluster-robust
portmanteau over lags lags, robust to heteroskedasticity and weak cross-sectional
dependence in the spirit of Chen (2022); chi2(lags).

The lag-1 residual autocorrelation rho_hat is also reported.

Options

model(fe|re) working model; default fe.

lags(#) number of lags for the Chen portmanteau; default 1.

graph scatter of e(t) against e(t-1) with a fitted line (slope = rho).

Stored results

r(baltagi_li) Baltagi-Li statistic

r(p_baltagi_li) its p-value

r(chen) Chen portmanteau statistic

r(p_chen) its p-value

r(rho1) lag-1 residual autocorrelation

Examples

. xttestpanel serial ln_wage age tenure hours, graph

. xttestpanel serial ln_wage age tenure hours, lags(3)

. xtreg ln_wage age tenure hours, fe

. xttestpanel serial, lags(2)

References

Baltagi, B.H., and Q. Li. 1995. Journal of Econometrics 68: 133-151.

Baltagi, B.H., B.C. Jung, and S.H. Song. 2010. Journal of Econometrics 154: 122-124.

Chen, B. 2022. Econometric Reviews 41: 1095-1112.

Born, B., and J. Breitung. 2016. Econometric Reviews 35: 1290-1316.

Author

Merwan Roudane - merwanroudane920@gmail.com -
github.com/merwanroudane