*! version 1.2.0 08jul2026

Title

tsadvroot npadf -- Unit-root test with two structural breaks at
unknown dates (Narayan and Popp 2010)

Syntax

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

model(string) 1 (M1: two breaks in the level) or
2 (M2: two breaks in level and slope); default model(1)

pmax(#) maximum lag of D.varname; default
pmax(8)

ic(string) lag selection per break pair: aic, sic
or tstat (default, the source default)

trim(real) trimming fraction for the break search; default
trim(0.10) (the source's coded default)

sequential select the two breaks by the Narayan-Popp (2010)
sequential procedure (paper Eqs. 10-11)

simul select the two breaks by the Narayan-Popp (2010)
simultaneous procedure (paper Eq. 9)

graph plot the series with the estimated break dates

name(string) graph name

noprint suppress the results table

The data must be tsset, contiguous within the sample.

Description

tsadvroot npadf implements the Narayan and Popp (2010) ADF-type
unit-root test allowing for two structural breaks at unknown dates. Model M1
allows two breaks in the level of a trending series; model M2 allows two
breaks in both the level and the slope. In every case the reported statistic
is the ADF t-ratio on y_t-1 and the critical values are from Narayan and Popp
(2010, Table 3) and depend on the sample size.

Three break-search procedures are available, so the command can reproduce
either the widely-used GAUSS/tspdlib routine or the paper's own procedures:

default (grid) -- the tspdlib ADF_2breaks routine: additive
lagged level/trend dummies (no impulse dummies), break dates chosen to
minimize the ADF t over a two-dimensional grid. This is what most applied
work reports as "the Narayan-Popp test".

sequential -- Narayan and Popp (2010, Eqs. 10-11): the paper-form
test regression (Eq. 7 for M1, Eq. 8 for M2), which adds the innovational-
outlier one-period impulse dummies 1(t=TB+1). TB1 is chosen to maximize the
absolute t of its impulse coefficient; TB2 is then chosen the same way given
TB1. This is the paper's preferred procedure and the one behind the Table 3
critical values.

simul -- Narayan and Popp (2010, Eq. 9): the same paper-form
regression, but both breaks are chosen jointly to maximize the F statistic for
the joint significance of the two impulse-dummy coefficients.

Options

model(1) (aliases a, level, m1) or model(2)
(aliases c, both, m2).

ic(): for each candidate break pair, the lag order is re-selected
by the chosen criterion, exactly as in the source (aic/sic with
the tspdlib (k+2) penalty, tstat = general-to-specific with
|t| > 1.645).

trim(): the grid runs from max(3+pmax, ceil(trim x T)) to
min(T-3-pmax, floor((1-trim) x T)), with the second break at least 2
(model 1) or 3 (model 2) periods after the first.

sequential and simul are mutually exclusive; omit both for the
default GAUSS/tspdlib grid. Under either paper procedure the reported ADF
statistic is the t-ratio on y_t-1 at the selected break pair, and (for
simul) the winning joint-impulse F is returned in r(fstat).

Methods and formulas

Default (grid). For each candidate pair (TB1, TB2) the test regression is

D.y_t = rho y_t-1 + z_t-1' gamma + sum_j phi_j D.y_t-j + e_t

with z = (1, t, DU1, DU2) in M1 and z = (1, t, DU1, DU2, DT1, DT2) in M2,
where DU_i,t = 1(t > TB_i) and DT_i,t = (t - TB_i) 1(t > TB_i). The
deterministic terms enter lagged (z_t-1). No impulse dummies are
included, and the statistic is the t-ratio on rho at the break pair that
minimizes it. This reproduces the GAUSS/tspdlib ADF_2breaks
routine.

Paper form (sequential/simul). The regression adds
the innovational-outlier one-period impulse dummies D(TB_i)_t = 1(t = TB_i+1)
of Narayan and Popp (2010, Eqs. 7-8):

D.y_t = rho y_t-1 + a + b t + theta1 D(TB1)_t + theta2 D(TB2)_t + z_t-1' gamma
+ sum_j phi_j D.y_t-j + e_t

with the lagged level (and, for M2, trend) dummies in z_t-1 as above. Break
dates are chosen from the impulse coefficients: sequential maximizes
|t(theta1)| then |t(theta2)| (Eqs. 10-11); simul maximizes the joint F
of (theta1, theta2) (Eq. 9). The impulse and lagged-level dummies use the same
timing convention as the grid path, so a given TB indexes the same regime
break under all three procedures. Because the grid path drops the impulse
dummies and uses a different selection rule, its statistic and (occasionally)
its break dates differ from the paper procedures on the same data; the Table 3
critical values were generated under the paper's procedure.

Source compatibility (narayan pop.src)

The following source conventions are reproduced exactly:

- the linear trend is included in both models;

- deterministics enter lagged one period;

- default trimming is 0.10 (the coded dynargsGet default; the
source's comment header mentions 15%, but the code default is 10%);

- effective grid bounds: because GAUSS symbols are case-insensitive,
T1/t1 and T2/t2 in the source are the same
variables; the operative bounds are T1 = max(3+pmax, ceil(trim T)) (raised
to pmax+3 if below pmax+2) and T2 = min(T-3-pmax, floor((1-trim) T));

- minimum separation between breaks: 2 periods in M1, 3 in
M2;

- lag re-selected at every break pair; AIC/SIC use the (k+2)
penalty; the reported lag is the one at the minimizing pair;

- critical values switch at T = 50, 200, 400 (NP Table 3).

The reported break dates TB1 and TB2 are the last period of the
pre-break regime: the break dummies switch on strictly after TB.

Stored results

Scalars

r(stat) minimized ADF statistic

r(tb1), r(tb2) break dates (time-variable units)

r(tb1pos), r(tb2pos) break positions (1..T)

r(frac1), r(frac2) break fractions

r(lags) selected lag order at the optimum

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

r(fstat) joint-impulse F at the selected pair (simul
only)

r(T) sample size

Macros

r(cmd), r(varname), r(model), r(ic),
r(breakdates), r(breaksearch)

Examples

. webuse air2, clear

. gen lair = ln(air)

. tsadvroot npadf lair, model(1) graph

. tsadvroot npadf lair, model(2) pmax(4) ic(sic) trim(0.15)

. di r(stat) " breaks at " r(tb1) " and " r(tb2)

Paper procedures (impulse dummies, NP's own break selection):

. tsadvroot npadf lair, model(2) sequential

. tsadvroot npadf lair, model(2) simul

. di r(stat) " joint-impulse F = " r(fstat)

References

Narayan, P. K., and S. Popp. 2010. A new unit root test with two structural
breaks in level and slope at unknown time.
Journal of Applied Statistics 37: 1425-1438.

Narayan, P. K., and S. Popp. 2013. Size and power properties of structural
break unit root tests. Applied Economics 45: 721-728.

Author

Merwan Roudane

merwanroudane920@gmail.com

https://github.com/merwanroudane

Also see

Help: tsadvroot, tsadvroot_qadf, tsadvroot_fqadf,
tsadvroot_cisur