*! version 1.2.0 29apr2026
help leestra

Title

leestra -- Lee-Strazicich unit root tests with one or two structural breaks

Syntax

leestra varname [if] [in]
[, options]

Options
model(string) break model: crash (default) or break

breaks(#) number of breaks: 0, 1, or 2; default is 1

lags(#) number of lagged differences; default is 0 for method(fixed) and floor(4*(T/100)^0.25) (at least 1) for method(gtos) and method(bg)

method(method) lag selection: fixed, gtos (default), or bg

slstay(#) significance level to retain a lag in GTOS; default is 0.10

signif(#) alias for slstay(); takes precedence if specified

bglags(#) BG horizon (number of lags tested for autocorrelation) under method(bg); default depends on data frequency

pi(#) trimming fraction at each end and minimum gap between breaks; default is 0.10

thin(#) grid spacing for break search; default is 1

title(string) custom report title

noprint suppress the result table

Description

leestra performs the Lee-Strazicich minimum LM unit-root test on a time series. The test allows
for up to two endogenously determined structural breaks under both the null and alternative
hypotheses, in contrast to tests in the Perron tradition which assume no break under the null. There
are three cases depending on the number of breaks:

breaks(0) - the Schmidt and Phillips (1992) LM unit-root test (no break).

breaks(1) - the Lee and Strazicich (2013) one-break LM test.

breaks(2) - the Lee and Strazicich (2003) two-break LM test.

Two break models are supported. model(crash) (Model A) allows abrupt changes in the level only,
while model(break) (Model C) allows simultaneous changes in level and trend.

The break dates are estimated by grid search over all admissible combinations: the first and last
pi() fraction of the regression range are excluded as candidate break dates, and consecutive
breaks must be at least pi()*T observations apart. For each combination, the test regression
is estimated and the LM t-statistic on the lagged level is computed. The reported test statistic is
the minimum t-statistic across all admissible break configurations.

The data must be declared as time series using tsset before calling leestra.

Note on gaps in the time index.
leestra works on the observation order of the touse-filtered sample: consecutive rows
are treated as one period apart, irrespective of the calendar values of the time variable.
If tsset reports gaps, leestra prints a warning and proceeds. This is appropriate
when the gaps are an artifact of the time variable's encoding (for example, weekly data
imported with mis-spaced dates), but may be misleading if the data is genuinely irregularly
sampled. Verify the data layout in such cases.

leestra is a Stata implementation of the @LSUnit procedure for RATS (Tom Doan, Estima);
the algorithm, critical-value tables, and numerical results match the original.

In addition to the standard lag-selection rules, leestra extends the procedure by a
Breusch-Godfrey based option (method(bg)) that selects the smallest lag length at
which residual autocorrelation is no longer detected.

Test procedure

Auxiliary regression

The Lee-Strazicich LM test is based on the following two-step regression. In the first step,
deterministic terms (a constant and the contemporaneous break dummies, if any) are removed from
the first differences of the series. In the second step, the partial sums of these residuals
S(t) are regressed on their own lag, the deterministic terms in levels, and k lagged
differences dS(t-i):

dy(t) = c0 + (sum over breaks i) phi_i*D_i(t) + u(t)

S(t) = S(t-1) + u_hat(t), with S(0) = 0

dy(t) = alpha*S(t-1) + c1 + (sum over breaks i) [phi_i*D_i(t) + (model 2 only) psi_i*DT_i(t)] +
(sum from j=1 to k) c_j*dS(t-j) + e(t)

where D_i(t) = 1[t = T_b,i + 1] is a one-period dummy at the date following the break, and
DT_i(t) = 1[t >= T_b,i + 1] is a step dummy active from one period after the break onward (used
only when model(break) is specified). The null hypothesis of a unit root corresponds to
H0: alpha = 0. The reported test statistic is the t-statistic on alpha.

Break search

For each admissible combination of break dates the auxiliary regression is estimated and its
t-statistic on alpha is recorded. The reported break dates are those that minimise the
t-statistic. With two breaks and thin(1) (the default) on a sample of about 60 observations,
roughly a thousand combinations are evaluated; on larger samples consider increasing thin().

Critical values

Critical values draw on the simulations of Lee and Strazicich (2003, 2013) and Schmidt and
Phillips (1992). Tables are tabulated for sample sizes T = 100, 250, 500 and 1000. Values are
linearly interpolated in T and, for model(break) with one break, in the relative break
location lambda; for two breaks the closest tabulated combination is used.

Options

model(string) specifies the type of structural break.
crash (Model A) allows an abrupt level shift only;
break (Model C) allows simultaneous shifts in the level and the trend slope.
crash is the default.

breaks(#) specifies the number of breaks. Must be 0, 1, or 2; critical
values are not tabulated for more than two breaks and the command will return an error if a
larger value is supplied. Default is breaks(1).

lags(#) specifies the number of lagged differences in the auxiliary regression.
With method(fixed) this value is always used; with method(gtos) or
method(bg) it is the maximum from which lags are pruned. If unspecified, the
default is 0 for method(fixed), and floor(4*(T/100)^0.25) (at least 1)
for method(gtos) and method(bg) so that the data-driven methods have a
non-trivial maximum from which to prune.

method(method) specifies the lag-selection method. fixed keeps lags() lags in
all regressions; gtos (general-to-specific) starts from the maximum and drops the highest
lag whenever its t-statistic falls below the critical value at the slstay() level;
bg (Breusch-Godfrey) selects the smallest lag count for which the residuals of the
auxiliary regression show no serial correlation up to bglags() (BG p-value at every lag
order from 1 to bglags() exceeds 0.05). gtos is the default, matching the original
Lee-Strazicich procedure. The BG selection is performed at every break combination, so the
chosen lag may differ across candidate break points and the reported bestlag corresponds
to the configuration that minimises the test statistic.

slstay(#) sets the two-sided t-test significance level for retaining a lag under
method(gtos). Default is 0.10.

signif(#) is an alias for slstay(). If both are specified, signif() takes
precedence.

bglags(#) is the BG horizon for method(bg): at each candidate lag length the
Breusch-Godfrey LM test is computed at every lag order from 1 to bglags(), and the
minimum p-value is used to decide whether residual autocorrelation is present. Default depends
on the data frequency: 2 for annual, 4 for half-yearly, 8 for quarterly, 24 for monthly,
52 for weekly, 100 for daily.

pi(#) sets the fraction of the regression range excluded as break candidates at each end
of the sample, and the minimum spacing between consecutive breaks. Must lie strictly in (0, 0.5).
Default is 0.10.

thin(#) sets the grid step for the break search. The default value 1 examines every
admissible point. For two-break models on large samples, thin(5) or higher reduces runtime
significantly at the cost of a coarser grid.

title(string) overrides the default report title.

noprint suppresses the on-screen result table. Stored results are still produced.

Remarks

Choosing the model

model(break) (Model C) is the most general specification and is recommended when there is
uncertainty about the nature of the breaks. model(crash) (Model A) is appropriate when
breaks affect only the level of the series, for example a one-time policy intervention or a
currency depreciation. Using a more general model than necessary reduces the power of the test.

Choosing the number of breaks

The maximum number of breaks should reflect prior economic knowledge about the series. Critical
values are only tabulated for up to two breaks; for series where more than two structural breaks
are plausible, alternative tests such as Kapetanios (2005) (see kapetanios, if
installed) or Carrion-i-Silvestre, Kim and Perron (2009) should be considered.

Lag selection

The method(gtos) approach is the original Lee-Strazicich procedure: it eliminates lags
from the highest down whenever their t-statistic is insignificant. The method(fixed)
alternative keeps all lags() lags in the regression and is useful for replication or when
a specific lag length is dictated by theory or by an information criterion computed beforehand.

method(bg) - General-to-specific (GTS) selection based on the Breusch-Godfrey LM test
for serial correlation. Starting from lags() downward, the BG test is applied to the
residuals of the auxiliary regression at lag orders 1 through bglags(). If
autocorrelation is detected at any of these lag orders (p < 0.05), the procedure retains the
previous lag length. This method directly targets the elimination of serial correlation,
which is the primary purpose of including lagged differences in the test regression. Because
each candidate break configuration in the Lee-Strazicich grid search yields a different
auxiliary regression, the BG selection is repeated at every break combination, and the chosen
lag may differ across candidate break dates. In addition to the standard lag-selection rules,
leestra extends the procedure by this Breusch-Godfrey based option that selects the
smallest lag length at which residual autocorrelation is no longer detected.

Sample-size considerations

Critical values are tabulated for T = 100, 250, 500 and 1000. For samples below T = 100,
finite-sample distortions can be substantial; results should be interpreted with caution. For
samples between two tabulated values, critical values are linearly interpolated in T.

Stored results

leestra stores the following in r():

Scalars

r(tstat) LM unit-root test statistic (minimum t)

r(nobs) observations in the auxiliary regression

r(bestlag) selected lag length

r(ndf) degrees of freedom

r(breaks) number of breaks

r(model) 1 for crash, 2 for break

r(lambda1) relative position of the first break

r(lambda2) relative position of the second break

r(ncomb) number of break combinations evaluated

r(bg_chi2) Breusch-Godfrey AR(1) test statistic (only for method(bg))

r(bg_p) Breusch-Godfrey AR(1) p-value (only for method(bg))

r(bg_minp) minimum BG p-value across orders 1..bglags() (only for method(bg))

r(bg_warn) 1 if autocorrelation could not be eliminated at lags() (only for method(bg))

Matrices

r(beta) coefficients (S(t-1), constant, break dummies)

r(tstats) t-statistics for the coefficients

r(bps) selected break positions (relative observation numbers)

r(cv) 1%, 5%, 10% critical values

Macros

r(varname) name of the tested series

Examples

The examples below use the classic Nelson-Plosser dataset. For each example, the equivalent
@LSUnit call in WinRATS is given immediately after the Stata command for direct comparison.

Setup

Stata

. use "https://www.eruygurakademi.com/datasets/nelsonplosser.dta", clear

. tsset year

. gen lrgnp = log(realgnp)

. gen logwage = 100 * log(realwages)

. gen lcpi = log(cpi)

. gen lstock = log(stockprice)

WinRATS

cal(a) 1860

allocate 1970:1

open data nelsonplosser.rat

data(format=rats) 1860:1 1970:1

source lsunit.src

set lrgnp 1909:1 1970:1 = log(realgnp)

set logwage 1900:1 1970:1 = 100*log(realwages)

set lcpi 1860:1 1970:1 = log(cpi)

set lstock 1871:1 1970:1 = log(stockprice)

Note on running the WinRATS examples.
The @LSUnit procedure determines the regression range automatically from the input series.
When several commands are submitted in succession in the same RATS session, the determined range
may occasionally carry over from a previous call. If the resulting "Regression Run From ... to ..."
line shows an unexpected range, run the command in a fresh session, or provide the start and end
dates explicitly, e.g. @lsunit(...) lrgnp 1909:1 1970:1.

Example 1. Real GNP, crash model, one break, fixed lags = 4.

Stata

. leestra lrgnp, model(crash) breaks(1) lags(4) method(fixed)

WinRATS

@lsunit(model=crash,breaks=1,lags=4,method=fixed) lrgnp

Example 2. Real GNP, break model, two breaks, GTOS lag selection up to 4.

Stata

. leestra lrgnp, model(break) breaks(2) lags(4)

WinRATS

@lsunit(model=break,breaks=2,lags=4,method=gtos) lrgnp

Example 3. Real GNP, no break (Schmidt-Phillips test), fixed lags = 4.

Stata

. leestra lrgnp, breaks(0) lags(4) method(fixed)

WinRATS

@lsunit(breaks=0,lags=4,method=fixed) lrgnp

Example 4. 100*log(real wages), break model, one break, GTOS up to 8.

Stata

. leestra logwage, model(break) breaks(1) lags(8)

WinRATS

@lsunit(model=break,breaks=1,lags=8,method=gtos) logwage

Example 5. log(CPI), crash model, two breaks, fixed lags = 2.

Stata

. leestra lcpi, model(crash) breaks(2) lags(2) method(fixed)

WinRATS

@lsunit(model=crash,breaks=2,lags=2,method=fixed) lcpi

Example 6. log(stock prices), break model, one break, GTOS up to 6, slstay = 0.05.

Stata

. leestra lstock, model(break) breaks(1) lags(6) slstay(0.05)

WinRATS

@lsunit(model=break,breaks=1,lags=6,method=gtos,slstay=0.05) lstock

Example 7. Real GNP, break model, one break, BG-based lag selection up to 4.
This option is provided in leestra as an extension and has no direct WinRATS counterpart.

Stata

. leestra lrgnp, model(break) breaks(1) lags(4) method(bg)

Examples using Gretl sample datasets

The following examples use datasets from the Gretl sample file collection, hosted at
https://www.eruygurakademi.com/datasets/kapetanios/. They are tsset and ready
for use.

Example 8. Annual data (T=43): Interest rates and inflation, Canada.

. use https://www.eruygurakademi.com/datasets/kapetanios/jgm-data.dta, clear

. leestra r_s, model(break) breaks(2)

With default method(gtos), autocorrelation may remain at zero lags. Switching to
method(bg) addresses this directly:

. leestra r_s, model(break) breaks(2) method(bg)

The output prints a warning if autocorrelation persists at the maximum lag tried:

Warning: Autocorrelation could not be eliminated with lags = 0. BG selected the maximum lag (0). Try lags(1) or higher.

A larger lags() can be specified explicitly. If too large, leestra reports the
maximum feasible value:

. leestra r_s, model(break) breaks(2) method(bg) lags(18)

lags(18) is too large for the available sample (T = 43). Try lags(15) or smaller.

. leestra r_s, model(break) breaks(2) method(bg) lags(15)

. leestra r_s, model(break) breaks(2) method(bg) lags(12)

Example 9. Quarterly data (T=258): MIDAS data, quarterly GDP and monthly covariates.

. use https://www.eruygurakademi.com/datasets/kapetanios/gdp_midas.dta, clear

. leestra qgdp, breaks(2) model(break) method(bg) thin(10)

. leestra d.qgdp, breaks(2) model(break) method(bg) thin(10)

. leestra d2.qgdp, breaks(2) model(break) method(bg) thin(10)

Note: thin(10) is used here to speed up the example. More accurate
results are obtained with no thin (default thin(1)) or with smaller
values such as thin(5), at the cost of longer runtimes.

Example 10. Monthly data (T=144): Box and Jenkins Series G (airline passengers).

. use https://www.eruygurakademi.com/datasets/kapetanios/bjg.dta, clear

. leestra lg, breaks(2) model(break) method(bg) thin(10)

Note: thin(10) is used here to speed up the example. More accurate
results are obtained with no thin (default thin(1)) or with smaller
values such as thin(5), at the cost of longer runtimes.

Example 11. Weekly data (T=2117): Weekly NYSE closing price, 1966-2006.
Due to the large sample size, estimation may take approximately 2-3 minutes.

. use https://www.eruygurakademi.com/datasets/nysewk2.dta, clear

. leestra close, breaks(2) thin(10)

Note: thin(10) is used here to speed up the example. More accurate
results are obtained with no thin (default thin(1)) or with smaller
values such as thin(5), at the cost of longer runtimes.

Example 12. Daily data (T=1974): Bollerslev and Ghysels exchange rate data.
Due to the large sample size, estimation may take approximately 2-3 minutes.

. use https://www.eruygurakademi.com/datasets/kapetanios/b-g.dta, clear

. leestra Y, breaks(2) thin(10)

Note: thin(10) is used here to speed up the example. More accurate
results are obtained with no thin (default thin(1)) or with smaller
values such as thin(5), at the cost of longer runtimes.

Accessing stored results

. leestra lrgnp, model(break) breaks(1) lags(4)

. display r(tstat)

. matrix list r(bps)

. matrix list r(cv)

References

Lee, J. and M. C. Strazicich. 2003. Minimum LM unit-root test with two structural breaks.
Review of Economics and Statistics 85(4): 1082-1089.

Lee, J. and M. C. Strazicich. 2013. Minimum LM unit-root test with one structural break.
Economics Bulletin 33(4): 2483-2492.

Schmidt, P. and P. C. B. Phillips. 1992. LM tests for a unit root in the presence of
deterministic trends. Oxford Bulletin of Economics and Statistics 54(3): 257-287.

Doan, T. 2017. @LSUnit: Lee-Strazicich unit-root test (RATS procedure).
Estima, Evanston, IL. Available from http://www.estima.com.

Author

H. Ozan Eruygur

AHBV University, Ankara, Turkiye.

Department of Economics

https://www.ozaneruygur.com

eruygur@gmail.com

Eruygur Academy and Consulting (Eruygur Akademi ve Danismanlik), Ankara, Turkiye.

https://www.eruygurakademi.com

eruygurakademi@gmail.com

leestra v1.2.0 - April 2026

Please cite as:

Eruygur, H. O. 2026. leestra: Lee-Strazicich unit root tests with one or two structural breaks.
Stata package version 1.2.0. Available from: https://www.eruygurakademi.com