Title

segmcoint mr -- Martins & Rodrigues (2021) residual sup-Wald tests for
segmented cointegration

Syntax

segmcoint mr depvar indepvars [if] [in]
[, options]

deterministic(string) none, const (default), trend
= cases (a)/(b)/(c)

maxbreaks(#) maximum number of breaks m-bar for Wmax; default 4

trim(#) trimming eps (minimum regime length as a fraction of T);
default 0.15

adflags(#) lagged differences in the ADF regression (serial-correlation
correction); default 0

graph plot W(m) and Wmax against their 5% critical values

graphname(name) graph name

noheader suppress header

The data must be tsset. K+1 = 1 + number of regressors must be <= 6.

Description

segmcoint mr implements the residual-based sup-Wald procedure of
Martins & Rodrigues (2021), which extends the
Kejriwal-Perron persistence-change framework to cointegration. Full-sample OLS
residuals of the cointegrating regression are subjected to an ADF regression whose
error-correction term is allowed to switch across m+1 regimes. For each number of
breaks m the test contrasts the restricted (no-cointegration, spurious) sum of
squared residuals with the unrestricted sum computed over the SSR-minimising
partition, under two alternatives:

o F_A - odd regimes have a unit root, even regimes are stationary;

o F_B - the first (and odd) regimes are stationary.

W(m) = max(sup F_A, sup F_B) accommodates an unknown order of integration of the
first regime, and Wmax = max over m = 1..m-bar is a double-maximum statistic that
does not require m to be known. Break dates are estimated by global SSR
minimisation (Bai-Perron dynamic programming).

Options

deterministic(string) selects the deterministic kernel of the
cointegrating regression (unshifted, as in the paper's Remark 1).

maxbreaks(#) sets m-bar for the Wmax double-maximum statistic. Tabulated
critical values cover W(1)-W(4) and Wmax; W(m) for m>4 is reported without a
critical value.

trim(#) is the trimming eps that bounds the minimum regime length
[eps*T]; the authors use 0.15.

adflags(#) adds lagged differences to the ADF regression to absorb
serial correlation in the error (the common short-run dynamics); with iid errors
0 is appropriate.

Interpreting the output

W(1)..W(m-bar) and Wmax are printed with 10/5/2.5/1% upper-tail critical values
(Table 1, T = 1000). Reject the null of no cointegration when a statistic is
above the critical value; stars mark the level. The command then reports the
Wmax-selected number of breaks m* and the estimated break fractions.

Remarks and practical guidance

o The critical values are for T = 1000. In smaller samples the tests are oversized:
the authors report Wmax empirical size around 0.10-0.16 at T = 200. Treat borderline
rejections at short T with caution.

o The cointegrating vector is estimated once on the full sample and is assumed not
to shift (Remark 1). A regime with an unbounded random-walk error can contaminate
that estimate; the method has most power when cointegration prevails over the
majority of the sample.

o With serially correlated errors, increase adflags(); this augments the
common short-run dynamics exactly as in the paper.

Stored results

segmcoint mr stores in r():

Scalars

r(wmax) Wmax double-maximum statistic

r(w1)..r(wmbar) W(m) statistics

r(mstar) Wmax-selected number of breaks

r(T), r(K1) sample size and K+1

Matrices

r(stat) (mbar+1)x1: W(1..mbar) then Wmax

r(breaks) 1x(mbar+1): m* then the estimated break fractions

r(cv) 5x4 critical values (rows W(1..4),Wmax; cols 10/5/2.5/1%)

Author

Dr Merwan Roudane

merwanroudane920@gmail.com

github.com/merwanroudane