# Panel data, structural breaks and unit root testing

### Introduction

In this blog, we extend last week's analysis of unit root testing with structural breaks to panel data.

We will again use the quarterly current account to GDP ratio but focus on a panel of data from five countries: United States, United Kingdom, Australia, South Africa, and India.

Using panel data unit roots tests found in the GAUSS tspdlib library we consider if the panel collectively shows unit root behavior.

## Testing for unit roots in panel data

### Why panel data

There are a number of reasons we utilize panel data in econometrics (Baltagi, 2008). Panel data:

• Capture the idiosyncratic behaviors of individual groups with models like the fixed effects or random effects models.
• Can detect and measure statistical effects that pure time-series or cross-section data can't.
• Provide longer time-series for unit-root testing, which in turn leads to standard asymptotic behavior.

### Panel data unit root testing

Today we will test for unit roots using the panel Lagrangian Multiplier (LM) unit-root test with structural breaks in the mean (Im, K., Lee, J., Tieslau, M., 2005):

• The panel LM test statistic averages the individual LM test statistics which are computed using the pooled likelihood function.
• The asymptotic distribution of the test is robust to structural breaks.
• The test considers the null unit root hypothesis against the alternative that at least one time series in the panel is stationary.

## Testing our panel

### Setting up the test

The panel LM test can be run using the GAUSS `PDLMlevel` procedure found in the GAUSS tspdlib library. The procedure requires six inputs:

y_test
T x N matrix,  the panel data to be tested.
model
Scalar,  indicates the type of model to be tested.
1 = break in level.
2 = break in level and trend.
pmax
Scalar,  Maximum number of lags for Dy. 0 = no lags.
ic
Scalar,  the information criterion used to select lags.
1 = Akaike.
2 = Schwarz.
3 = t-stat significance.
trimm
Scalar,  data trimming rate.
nbreak
Scalar,  the number of breaks to allow.
1 = one break.
2 = two breaks.

The `PDLMlevel` procedure has five returns:

Nlm
Vector,  the minimum test statistic for each cross-section.
Ntb
Vector,  location of break(s) for each cross-section.
Np
Scalar,  number of lags selected by chosen information criterion for each cross-section.
PDlm
Scalar,  p-value of PDlm.

### Running the test

The test is easy to set up and run in GAUSS. We first load the GAUSS tspdlib library and set our model parameters. For our data we:

• Trim the top and bottom 10% of the data from potential breaks.
• Use a maximum of 12 lags for the dy.
• Determine lags using the t-statistic significance.
``````library tspdlib;

y_test = ca_panel[.,2:cols(ca_panel)];

// Maximum number of lags for Dy
pmax = 12;

// Information Criterion: T-stat significance
ic = 3;

// Trimming rate
trimm = 0.10;  ``````

After setting parameters we call the `PDLMlevel` procedure separately for the one break and two break models:

``````// Run first with one break
nbreak = 1;

// Call PD LM with level break
{ Nlm, Ntb, Np, PDlm, pval } = PDLMlevel(y_test, 1, pmax, ic, trimm, nbreak);

// Run first with two breaks
nbreak = 2;

// Call PD LM with level break
{ Nlm, Ntb, Np, PDlm, pval } = PDLMlevel(y_test, 1, pmax, ic, trimm, nbreak);``````

### The results

CountryCross-section
test statistic
Break
location
Number of
lags
Conclusion
Two break model
United States-3.30671993 Q1, 2004 Q312Reject the null
United Kingdom-4.60801980 Q4, 1984 Q44Reject the null
Australia-3.95221970 Q3, 1977 Q412Reject the null
South Africa-5.67351976 Q4, 1983 Q44Reject the null
India-5.67341975 Q4, 2004 Q29<Reject the null
Full Panel-6.6339526N/AN/AReject the null

One break model
United States-3.05041993 Q112<Reject the null
United Kingdom-4.12131984 Q44Reject the null
Australia-3.16251980 Q212Reject the null
South Africa-5.12711979 Q44Reject the null
India-2.80011976 Q29Reject the null
Full Panel-8.9118730N/AN/AReject the null

Research on the presence of unit roots in current account balances has had mixed results. These results bring to the forefront the question of current account balance sustainability (Clower & Ito, 2012).

Our panel tests with structural breaks unanimously reject the null hypothesis of unit roots for all cross-sections, as well as the combined panel. This adds support, at least for our small sample, to the idea that current account balances are sustainable and mean-reverting.

### Conclusions

Today we've learned about conducting panel data unit root testing in the presence of structural breaks using the LM test from (Im, K., Lee, J., Tieslau, M., 2005). After today you should have a better understanding of:

1. Some of the advantages of using panel-data.
2. How to test for unit roots in panel data using the LM test with structural breaks.
3. How to use the GAUSS tspdlib library to test for unit roots with structural breaks.

Code and data from this blog can be found here.

## References

Baltagi, B. (2008). Econometric analysis of panel data. John Wiley & Sons.

Clower, E., & Ito, H. (2012). The persistence of current account balances and its determinants: the implications for global rebalancing.

Im, K., Lee, J., Tieslau, M. (2005). Panel LM Unit-root Tests with Level Shifts. Oxford Bulletin of Economics and Statistics 67, 393–419.

## 9 thoughts on “Panel data, structural breaks and unit root testing”

1. Erica Post author

Hello Luke,

This is an excellent question and points to some of the issues with panel unit root testing. The situation can arise where, as a panel, we are able to reject the null hypothesis of a unit root but we cannot reject the null for certain individuals within the panel.

1. The individual unit root test results tell us what we can conclude for each individual if we consider that individual's behavior alone.
2. The full panel data results tell us what we can conclude for the panel collectively.

This would make an excellent future blog topic!

Erica

1. Benny.owusuk

Dear Erica, Thanks for the information. Please does this test account for cross sectional dependence? Or its assumes that the individual cross sections are independent of each other? If not do you have something like a bootstrap method to account for cross sectional dependence?

1. Erica Post author

Hello Benny,

This test does not account for cross-sectional dependence. However, the `PD_nkarul` procedure, which applies the panel stationarity test with gradual structural shifts does allow for cross-sectional dependence.

It can also be found in the tspdlib library.

Best,
Erica

2. asifalig71

Dear Erica
How to make use of Gauss simple such as loading data in matrix form and running the programe.

### Have a Specific Question?

Get a real answer from a real person

### Need Support?

Get help from our friendly experts.