*! version 1.0.0 21jun2026

Title

xtnonlincoint -- Nonlinear panel cointegration tests robust to
structural breaks and cross-sectional dependence

Syntax

xtnonlincoint subcommand depvar indepvars [if] [in]
[, options]

where subcommand is one of:

ecm nonlinear error-correction based test
(Omay, Emirmahmutoglu & Denaux 2017)

fffff fractional frequency flexible Fourier
form test (Olayeni, Tiwari & Wohar 2021)

all run both tests on the same model

The data must be xtset as a balanced panel before use.
depvar is the left-hand-side variable and indepvars the long-run regressors.

Description

xtnonlincoint implements two recent panel cointegration tests that allow
the long-run adjustment to be nonlinear and the panel to display
cross-sectional dependence (CSD). Both tests reject the null of no
cointegration when the adjustment back to equilibrium is significant, and both
obtain critical values and p-values by a CSD-robust residual bootstrap.

ecm estimates a panel logistic smooth-transition error-correction model
(PLSTR-ECM) and forms the Abadir-Distaso modified Wald (MWALD) group-mean
statistic. fffff tests the stationarity of the cointegrating residual with
a Kapetanios-Shin-Snell (KSS) nonlinear ADF regression augmented by a
fractional-frequency Fourier term that captures an unknown number of smooth
structural breaks, and applies the Sequential Panel Selection Method (SPSM) to
identify which cross-sections drive the result.

Subcommands

xtnonlincoint ecm -- the nonlinear ECM-based
test. The cointegrating residual enters a conditional ECM with linear and
quadratic terms (a first-order Taylor expansion of a logistic transition). The
MWALD statistic orthogonalises the one-sided coefficient against the two-sided
one; a sieve bootstrap on a panel VAR in differences provides CSD-robust
critical values.

xtnonlincoint fffff -- the FFFFF test. For
each panel the cointegrating residual is tested for a unit root with a KSS cubic
term plus sin/cos Fourier terms whose frequency k is searched
on a fractional grid. A stationary bootstrap applied jointly to all panels
delivers CSD-robust p-values, and SPSM peels off the most stationary series
one at a time.

Options

Options specific to each test are documented on its own help page. Common
options include breps() (bootstrap replications), seed(),
trend (detrend rather than demean), graph (journal-style plots) and
noprint. See xtnonlincoint_ecm and xtnonlincoint_fffff.

Remarks

A balanced panel is required because the bootstrap resamples a common time
index across all cross-sections to preserve contemporaneous dependence. If the
panel is unbalanced the command stops with an informative error.

Examples

Setup

. webuse grunfeld, clear

. xtset company year

Nonlinear ECM-based test

. xtnonlincoint ecm invest mvalue kstock, lags(1) breps(299)

FFFFF test with SPSM and plots

. xtnonlincoint fffff invest mvalue kstock, spsm graph

Both tests at once

. xtnonlincoint all invest mvalue kstock, breps(299) seed(123)

Stored results

Each subcommand stores its results in r(); see the subcommand help pages
for the full list. Key scalars are r(stat) (group statistic),
r(p) (bootstrap p-value) and r(cv5) (5% critical value);
r(indstat) holds the per-panel statistics.

References

Abadir, K. M., and W. Distaso. 2007. Testing joint hypotheses when one of the
alternatives is one-sided. Journal of Econometrics 140: 695-718.

Olayeni, R. O., A. K. Tiwari, and M. E. Wohar. 2021. Fractional frequency
flexible Fourier form (FFFFF) for panel cointegration test. Applied
Economics Letters 28(6): 482-486.
doi:10.1080/13504851.2020.1761526.

Omay, T., F. Emirmahmutoglu, and Z. S. Denaux. 2017. Nonlinear error correction
based cointegration test in panel data. Economics Letters 157: 1-4.
doi:10.1016/j.econlet.2017.05.017.

Author

Merwan Roudane

merwanroudane920@gmail.com

github.com/merwanroudane