*! version 1.2.0 08jul2026

Title

tsadvroot cisur -- GLS-based unit-root tests with multiple
structural breaks (Carrion-i-Silvestre, Kim and Perron 2009)

Syntax

tsadvroot cisur varname [if] [in]
[, options]

model(string) const (0: constant, no breaks),
trend (1: linear trend, no breaks), slope (2: breaks in the
trend slope), break (3: breaks in level and slope; the default)

breaks(#) number of unknown breaks to estimate: 1-3 with
method(brute), 1-5 with method(dp); default breaks(1)

breakdates(numlist) known break dates (time-variable
values, up to 5); overrides breaks()

method(string) break-search algorithm: brute (grid
search, GAUSS estimation=0, the source default) or dp (dynamic
programming, GAUSS estimation=1)

maxiter(#) maximum GLS/estimation iterations for method(dp);
default maxiter(100)

penalty(string) lag penalty for the long-run variance:
maic (default) or bic

kmax(#) maximum lag for the long-run variance; default
kmax(4)

kmin(#) minimum lag; default kmin(0)

graph plot the series with the GLS-estimated broken trend and
break dates

name(string) graph name

noprint suppress the results table

The data must be tsset, contiguous within the sample.

Description

tsadvroot cisur implements the Carrion-i-Silvestre, Kim and Perron
(2009) extension of the Elliott-Rothenberg-Stock / Ng-Perron framework to
multiple structural breaks under both the null and the alternative. It
reports seven statistics computed on the quasi-GLS-detrended series:

PT, MPT feasible point-optimal statistics

ADF augmented Dickey-Fuller t on the GLS-detrended series

ZA Phillips-Perron Z_alpha (GLS)

MZA, MSB, MZT Ng-Perron M-tests (GLS)

Unknown break dates are estimated in one of two ways, matching the two
estimation paths of the GAUSS source: method(brute) (the default, the
sburControlCreate default) minimizes the GLS sum of squared residuals
over all admissible break-date combinations (up to 3 breaks); method(dp)
uses the source's dynamic-programming algorithm (Bai-Perron dating followed by
iterated GLS re-dating and restricted GLS estimation), which handles up to 5
breaks and is the more accurate procedure for the general multiple-break case.
The non-centrality parameter c-bar and the 1%, 2.5%, 5% and 10% critical
values are evaluated from the authors' response surfaces at the estimated
break fractions, so no bootstrap is needed. All seven tests reject the unit
root for values below the critical value.

Options

model(): models 0 and 1 are the no-break ERS cases with fixed
c-bar = -7 and -13.5 respectively; model 2 lets each break shift the slope
of the trend; model 3 (the default, the paper's leading case) lets each
break shift both the level and the slope.

breaks(#): with method(brute) the search is O(T) for one break,
O(T^2) for two and O(T^3) for three - with T around 200 and breaks(3)
expect several minutes; minimum segment length is 2 and the first/last 3
observations are excluded, as in the source. method(dp) is far faster
(the dynamic-programming recursion is O(T^2) regardless of the number of
breaks) and supports up to 5; it uses 10% trimming, as in the source.

method(), maxiter(): brute reproduces the source's
brute-force branch and is the sburControlCreate default; dp
reproduces the source's dynamic-programming branch. The two give the same
answer for 1-3 breaks when both apply, but can select different dates in
finite samples (the dp restricted-estimation stage refines them). maxiter()
caps the stage-2 GLS-dating and stage-3 outer iterations (the source default
is 100; the inner restricted-estimation loop is fixed at 10).

breakdates(numlist): supply up to 5 known break dates (values of the
time variable, strictly increasing). The statistics and critical values are
then computed at those dates without any search.

penalty(), kmax(), kmin(): the autoregressive long-run
variance s2(AR) uses a lag order selected by MAIC (Ng-Perron) or BIC on the
OLS-detrended series (Perron's recommendation, as in the source), with
k between kmin() and kmax().

Methods and formulas

For a candidate break vector, the deterministics are z_t = (1, t, ...) plus,
for each break TB_j, a level shift DU_j (model 3 only) and a slope shift
DT_j = (t-TB_j)1(t>TB_j). The series is quasi-differenced at
alpha-bar = 1 + c-bar/T, where c-bar is the response-surface value at the
break fractions; the GLS coefficients minimize the quasi-differenced SSR,
and the break dates minimize that SSR over the grid. On the detrended series
y-tilde the statistics follow Ng and Perron (2001):

MZA = (y-tilde_T^2/(T-1) - s2AR) / (2 kappa),
MSB = sqrt(kappa/s2AR), MZT = MZA x MSB,

ZA = (T-1)(alpha-hat - 1) - (s2AR - s2u)/(2 kappa),
kappa = sum(y-tilde_t-1^2)/(T-1)^2,

PT = (SSR(alpha-bar) - alpha-bar SSR(1))/s2AR, and the MPT
analogue,

with s2AR the autoregressive long-run variance estimated from the ADF
regression with the MAIC/BIC lag chosen on OLS-detrended data.

Source compatibility (carrion silvestre2009.src)

The following source conventions are reproduced exactly:

- both estimation paths of the source are implemented:
method(brute) = __sbur_multiple_gls_brute (estimation = 0,
the sburControlCreate default) and method(dp) =
__sbur_multiple_gls_algorithm (estimation = 1: OLS Bai-Perron
dating, iterated GLS re-dating with c-bar updating, and the restricted
GLS estimation stage __sbur_est2_gls), transcribed from the GAUSS
source and cross-checked to numerical precision across models and break
counts;

- as in the source, the dp path uses the stage-2 c-bar for the final
statistics while building the regressors from the stage-3 dates;

- brute-force search bounds j in [3, T-3] with a minimum of 2 periods
between consecutive breaks; dp trimming fixed at 10%;

- c-bar re-evaluated from the response surface at every candidate
break vector;

- s2(AR) lag chosen on OLS-detrended data; its regression has no
constant, variance divisor n (not n-k), and the fixed common sample
T-kmax-1 in the selection step;

- the critical-value mapping of the source's output routine:
PT and MPT use the PT surface, ADF and MZT use the MZT surface, ZA and MZA
use the MZA surface, MSB its own;

- response-surface coefficient matrices transcribed digit-for-digit
from the source (61 c-bar coefficients; 63 x 16 critical-value
coefficients).

Stored results

Scalars

r(pt), r(mpt), r(adf), r(za), r(mza),
r(msb), r(mzt) the seven statistics

r(cbar) non-centrality parameter c-bar

r(lags) long-run-variance lag (MAIC/BIC)

r(nbreaks) number of breaks

r(T) sample size

Macros

r(cmd), r(varname), r(model), r(method),
r(penalty), r(breakdates)

Matrices

r(stats) 1 x 7: PT MPT ADF ZA MZA MSB MZT

r(cv) 4 x 4 critical values (rows MSB MZA MZT PT; columns
1% 2.5% 5% 10%)

r(breakpos) estimated/known break positions (models 2-3)

Examples

. webuse air2, clear

. gen lair = ln(air)

No-break GLS tests (ERS/Ng-Perron with response-surface cv)

. tsadvroot cisur lair, model(trend)

One estimated level-and-slope break, with the fitted broken trend

. tsadvroot cisur lair, model(break) breaks(1) graph

Two estimated breaks, BIC lag penalty

. tsadvroot cisur lair, model(break) breaks(2) penalty(bic)

Four breaks via the dynamic-programming algorithm (not available under
the brute-force default)

. tsadvroot cisur lair, model(break) breaks(4) method(dp)

Known break dates

. tsadvroot cisur lair, model(break) breakdates(1955m1 1958m1)

(supply the dates as values of the time variable; for string dates
use e.g. breakdates(`=tm(1955m1)' `=tm(1958m1)'))

References

Carrion-i-Silvestre, J. L., D. Kim, and P. Perron. 2009. GLS-based unit root
tests with multiple structural breaks under both the null and the
alternative hypotheses. Econometric Theory 25: 1754-1792.

Elliott, G., T. J. Rothenberg, and J. H. Stock. 1996. Efficient tests for an
autoregressive unit root. Econometrica 64: 813-836.

Ng, S., and P. Perron. 2001. Lag length selection and the construction of
unit root tests with good size and power. Econometrica 69: 1519-1554.

Perron, P., and Z. Qu. 2007. A simple modification to improve the finite
sample properties of Ng and Perron's unit root tests.
Economics Letters 94: 12-19.

Author

Merwan Roudane

merwanroudane920@gmail.com

https://github.com/merwanroudane

Also see

Help: tsadvroot, tsadvroot_qadf, tsadvroot_fqadf,
tsadvroot_npadf, dfgls