*! version 1.0.0 06jun2026

Title

xtpdlib -- A library of second-generation panel data tests
(panel unit root, panel stationarity and bootstrap panel causality)

Overview

xtpdlib is a Stata library that brings several modern panel time-series tests
- accounting for cross-section dependence, structural shifts and
heterogeneity - from Saban Nazlioglu's GAUSS TSPDLIB into Stata, with
journal-quality output tables, publication-style graphs, and fully cross-linked help.

All commands require the data to be declared as a balanced panel with xtset.

Commands

xtfpss Fourier panel stationarity test with gradual/smooth structural
shifts and cross-section dependence (Nazlioglu & Karul, 2017). H0: stationarity.
Produces the Fig.1-style series-and-Fourier-approximation plot.

xtcipsm Modified CADF / CIPS panel unit-root test with standard
chi-squared and normal limiting distributions (Westerlund & Hosseinkouchack, 2016;
Pesaran, 2007). H0: unit root. Reports the standard CIPS as a by-product.

xtpgc Bootstrap panel Granger causality in heterogeneous mixed panels:
Fisher (Emirmahmutoglu & Kose, 2011) and SUR-Wald (Konya, 2006), with cross-section
dependence handled by bootstrap critical values.

Related community commands (not part of this library):

xtcips - standard Pesaran (2007) CIPS.

pescadf - single-series Pesaran (2007) CADF/CIPS.

xtgcause - Dumitrescu-Hurlin (2012) Zbar panel causality.

Common setup

Every command expects a balanced panel declared with xtset:

. xtset panelid timevar

The unit root / stationarity commands take a single varname; the causality
command takes a varlist of two or more variables.

Quick examples

. webuse grunfeld, clear

. xtset company year

. xtfpss invest, model(level) freq(1) graph

. xtcipsm invest, model(constant) graph

. xtpgc invest mvalue, method(fisher) breps(200) seed(1) graph

Origin and citation

These commands are Stata translations of routines from the GAUSS TSPDLIB library by
Saban Nazlioglu (Pamukkale University). Please cite the original methodological papers
(listed in each command's help) and, where appropriate, the application papers such as
Kar, Nazlioglu and Agir (2011).

Author

Stata library xtpdlib - implementation and packaging:

Dr Merwan Roudane

merwanroudane920@gmail.com

github.com/merwanroudane

Original GAUSS code (TSPDLIB):

Saban Nazlioglu, snazlioglu@pau.edu.tr