### 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.
- Contain more information, more variability, and more efficiency.
- 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;
// Load data
ca_panel = loadd("panel_ca.dat");
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

Country | Cross-section test statistic | Break location | Number of lags | Conclusion |
---|---|---|---|---|

Two break model | ||||

United States | -3.3067 | 1993 Q1, 2004 Q3 | 12 | Reject the null |

United Kingdom | -4.6080 | 1980 Q4, 1984 Q4 | 4 | Reject the null |

Australia | -3.9522 | 1970 Q3, 1977 Q4 | 12 | Reject the null |

South Africa | -5.6735 | 1976 Q4, 1983 Q4 | 4 | Reject the null |

India | -5.6734 | 1975 Q4, 2004 Q2 | 9< | Reject the null |

Full Panel | -6.6339526 | N/A | N/A | Reject the null |

One break model | ||||

United States | -3.0504 | 1993 Q1 | 12< | Reject the null |

United Kingdom | -4.1213 | 1984 Q4 | 4 | Reject the null |

Australia | -3.1625 | 1980 Q2 | 12 | Reject the null |

South Africa | -5.1271 | 1979 Q4 | 4 | Reject the null |

India | -2.8001 | 1976 Q2 | 9 | Reject the null |

Full Panel | -8.9118730 | N/A | N/A | Reject 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:

- Some of the advantages of using panel-data.
- How to test for unit roots in panel data using the LM test with structural breaks.
- 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.

LukeHow to determine the "Reject the null" for the individual if they are not unanimous.

EricaPost authorHello 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.

The short answer is that:

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

[email protected]Hello,

I run the data and found this error-G0025 : Undefined symbol: 'PDLMlevel' [code.gss, line 31].

I am new to GAUSS, can someone help please?

EricaPost authorHello,

This type of error occurs because GAUSS is not able to find where the GAUSS procedure

`PDLMlevel`

is defined. This likely occurs because the tspdlib library has not been installed properly.My first suggestion it to reinstall the tspdlib library using the GAUSS package manager.

Erica

Benny.owusukDear 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?

EricaPost authorHello 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

Benny.owusukDear Erica,

Thank you so much for the information

Best Regards

Benny

asifalig71Dear Erica

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

EricaPost authorHello Asifalig71,

This is an excellent question. We have a few resources available that you may find useful.

For

loading data in a matrixI suggest using our new data management tools (introduced in GAUSS 21). We have some recent blogs demonstrating these:For

running GAUSS programsI suggest the following video tutorials: