*! version 1.0.0 21jun2026

Title

xtnonlincoint ecm -- Nonlinear error-correction based panel
cointegration test (Omay, Emirmahmutoglu & Denaux 2017)

Syntax

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

Model
lags(#) lags of differenced variables in the ECM auxiliary
regression; default lags(1)

varlags(#) order of the panel VAR in differences used by the
sieve bootstrap; default varlags(1)

trend detrend (constant + linear trend) the cointegrating
regression; default is demeaned (constant only)

Bootstrap
breps(#) sieve-bootstrap replications; default breps(299)

seed(#) random-number seed; default seed(12345)

Reporting
level(#) confidence level for reporting; default level(95)

graph draw the individual-statistics bar chart and the bootstrap
null-distribution histogram

noprint suppress the results table

The panel must be xtset and balanced.

Description

xtnonlincoint ecm implements the first nonlinear error-correction based
panel cointegration test. For each cross-section i it estimates a
conditional panel logistic smooth-transition ECM (PLSTR-ECM). Because the
transition speed is not identified under the null, the logistic transition is
replaced by its first-order Taylor expansion, giving the auxiliary regression

D.y(it) = rho1*u(i,t-1) + rho2*u(i,t-1)^2
+ sum_j d(ij)*D.z(i,t-j) + w(i)*D.x(it) + e(it),

where u(i,t-1) is the lagged cointegrating residual and z = (y, x). The null of
no error correction (hence no cointegration) is H0: rho1 = rho2 = 0; the
alternative is mixed (rho1 two-sided, rho2 one-sided), so the Abadir-Distaso
modified Wald (MWALD) statistic tau(c) is used and averaged into a group-mean
statistic. Cross-section dependence is handled by a sieve bootstrap on a panel
VAR fitted to the first differences.

Options

lags(#) sets the number of lagged differences D.z(i,t-j) entering the
auxiliary ECM regression. Larger values absorb more residual serial correlation
at the cost of degrees of freedom.

varlags(#) sets the order of the panel VAR in differences whose
(whitened) residuals are resampled by the sieve bootstrap. The serial
dependence removed at this stage is re-injected through the VAR recursion when
the pseudo-data are built.

trend adds a linear trend to the first-stage cointegrating regression
(detrended case). The default demeans only.

breps(#) sets the number of bootstrap replications used for the
critical values and p-values. The published study uses warp-speed
bootstrap; 299-999 replications are typical.

seed(#) fixes the seed so results are reproducible.

graph produces a two-panel figure: a bar chart of the individual tau(c)
statistics with the 5% bootstrap critical value, and a histogram of the
bootstrap null distribution of the group statistic with the observed value
marked.

Method

The MWALD statistic for panel i is

tau(c)_i = (rho1 - rho2*v21/v22)^2 / (v11 - v21^2/v22)
+ 1 * rho2^2 / v22,

where v11, v22 and v21 are elements of the 2x2 covariance matrix of
(rho1, rho2). The group statistic is the cross-sectional average. The bootstrap
imposes the unit-root null by cumulating VAR-generated pseudo-innovations into
I(1) pseudo-data, recomputing tau(c) on each draw; the p-value is the share
of bootstrap group statistics at least as large as the observed one.

Examples

. webuse grunfeld, clear

. xtset company year

. xtnonlincoint ecm invest mvalue kstock

. xtnonlincoint ecm invest mvalue kstock, lags(2) varlags(2) trend graph

. matrix list r(indstat)

Stored results

xtnonlincoint ecm stores the following in r():

Scalars

r(stat) group-mean MWALD statistic tau(c)

r(p) bootstrap p-value

r(cv10), r(cv5), r(cv1) group critical values

r(N) number of panels

r(T) number of periods

r(lags), r(varlags), r(breps) option echoes

Macros

r(depvar) dependent variable

r(indepvars) long-run regressors

r(test) test label

Matrices

r(indstat) per-panel: id, tau(c), p-value, cv10, cv5, cv1

r(bootdist) bootstrap null distribution of the group statistic

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.

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