»  Home »  Products »  Features »   Panel-data unit-root tests

## Panel-data unit-root tests

Stata implements a variety of tests for unit roots or stationarity in panel datasets with xtunitroot. The Levin–Lin–Chu (2002), Harris–Tzavalis (1999), Breitung (2000; Breitung and Das 2005), Im–Pesaran–Shin (2003), and Fisher-type (Choi 2001) tests have as the null hypothesis that all the panels contain a unit root. The Hadri (2000) Lagrange multiplier (LM) test has as the null hypothesis that all the panels are (trend) stationary. Options allow you to include fixed effects and time trends in the model of the data-generating process.

The assorted tests make different asymptotic assumptions regarding the number of panels in your dataset and the number of time periods in each panel. xtunitroot has all your bases covered, including tests appropriate for datasets with a large number of panels and few time periods, datasets with few panels but many time periods, and datasets with many panels and many time periods. The majority of the tests assume that you have a balanced panel dataset, but the Im–Pesaran–Shin and Fisher-type tests allow for unbalanced panels.

We have data on the log of real exchange rates for a large panel of countries for 34 years. Here we apply the Levin–Lin–Chu test to a subset of data for the G7 countries to examine whether the series lnrxrate contains a unit root. Because we use the United States as the numeraire when computing the lnrxrate series, this subset of data contains six panels.

. xtunitroot llc lnrxrate if g7, lags(aic 10)

Levin-Lin-Chu unit-root test for lnrxrate

Ho: Panels contain unit roots               Number of panels  =      6
Ha: Panels are stationary                   Number of periods =     34

AR parameter: Common                        Asymptotics: N/T -> 0
Panel means:  Included
Time trend:   Not included

ADF regressions: 1.00 lags average (chosen by AIC)
LR variance:     Bartlett kernel, 10.00 lags average (chosen by LLC)

Statistic      p-value



The header of the output summarizes the test. The null hypothesis is that the series contains a unit root, and the alternative is that the series is stationary. As the output indicates, the Levin–Lin–Chu test assumes a common autoregressive parameter for all panels, so this test does not allow for the possibility that some countries’ real exchange rates contain unit roots while other countries’ real exchange rates do not. Each test performed by xtunitroot also makes explicit the assumed behavior of the number of panels and time periods. The Levin–Lin–Chu test with panel-specific means but no time trend requires that the number of time periods grow more quickly than the number of panels, so the ratio of panels to time periods tends to zero. The test involves fitting an augmented Dickey–Fuller regression for each panel; we requested that the number of lags to include be selected based on the AIC with at most 10 lags. To estimate the long-run variance of the series, xtunitroot by default uses the Bartlett kernel using 10 lags as selected by the method proposed by Levin, Lin, and Chu.

The Levin–Lin–Chu bias-adjusted t statistic is −4.0277, which is significant at all the usual testing levels. Therefore, we reject the null hypothesis and conclude that the series is stationary. When we use the demean option to xtunitroot to remove cross-sectional means from the series to mitigate the effects of cross-sectional correlation, we obtain a test statistic that is significant at the 5% level but not at the 1% level.

Because the Levin–Lin–Chu test requires that the ratio of the number of panels to time periods tend to zero asymptotically, it is not well suited to datasets with a large number of panels and relatively few time periods. Here we use the Harris–Tzavalis test, which assumes that the number of panels tends to infinity while the number of time periods is fixed, to test whether lnrxrate in our entire dataset of 151 countries contains a unit root:

. xtunitroot ht lnrxrate

Harris-Tzavalis unit-root test for lnrxrate

Ho: Panels contain unit roots               Number of panels  =    151
Ha: Panels are stationary                   Number of periods =     34

AR parameter: Common                        Asymptotics: N -> Infinity
Panel means:  Included                                   T Fixed
Time trend:   Not included

Statistic         z         p-value

rho                  0.7534      -22.0272       0.0000



Here we find overwhelming evidence against the null hypothesis of a unit root and therefore conclude that lnrxrate is stationary.

### References

Breitung, J. 2000.
The local power of some unit root tests for panel data. Advances in Econometrics, Volume 15: Nonstationary Panels, Panel Cointegration, and Dynamic Panels, ed. B. H. Baltagi, 161–178. Amsterdam: JAY Press.
Breitung, J., and S. Das. 2005.
Panel unit root tests under cross-sectional dependence. Statistica Neerlandica 59: 414–433.
Choi, I. 2001.
Unit root tests for panel data. Journal of International Money and Finance 20: 249–272.
Testing for stationarity in heterogeneous panel data. Econometrics Journal 3: 148–161.
Harris, R. D. F., and E. Tzavalis. 1999.
Inference for unit roots in dynamic panels where the time dimension is fixed. Journal of Econometrics 91: 201–226.
Im, K. S., M. H. Pesaran, and Y. Shin. 2003.
Testing for unit roots in heterogeneous panels. Journal of Econometrics 115: 53–74.
Levin, A., C.-F. Lin, and C.-S. J. Chu. 2002.
Unit root tests in panel data: Asymptotic and finite-sample properties. Journal of Econometrics 108: 1–24.