*! version 1.0.0 20jul2026

Title

bootur -- Bootstrap unit root tests for single series, multiple series and panels

Syntax

Standard (asymptotic) augmented Dickey-Fuller test

bootur adf varname [if] [in]
[, adf_options]

Bootstrap unit root tests on each series (no multiple-testing control)

bootur ur varlist [if] [in]
[, boot_options]

Bootstrap union test / bootstrap ADF test on a single series

bootur union varname [if] [in] [, boot_options]

bootur bootadf varname [if] [in] [, boot_options]

Bootstrap tests with multiple-testing control

bootur fdr varlist [if] [in] [, boot_options]

bootur sqt varlist [if] [in] [, steps(numlist) boot_options]

Panel (group-mean) unit root test

bootur panel varlist [if] [in] [, boot_options]

Order of integration, differencing and diagnostics

bootur order varlist [if] [in] [, method(str) maxorder(#) level(#) generate(str) boot_options]

bootur diff varlist [if] [in], orders(numlist) [generate(str) replace]

bootur plotmiss varlist [if] [in] [, name(str) title(str)]

bootur plotorder ordersmatrix [, name(str) title(str)]

boot_options

Bootstrap
bootstrap(str) bootstrap method: MBB, BWB, DWB, AWB (default), SB or SWB

b(#) number of bootstrap replications; default b(1999)

blocklength(#) block length; default round(1.75*T^(1/3))

ar(#) autoregressive parameter for AWB; default 0.01^(1/blocklength)

seed(#) random-number seed

nodots suppress the progress bar

Test specification
union(#) 1 = union test (default), 0 = single deterministic case

deterministics(str) none, intercept (default) or trend; only if union(0)

detrend(str) OLS (default) or QD; only if union(0)

level(#) significance / FDR / SQT level; default level(0.05)

Lag selection
criterion(str) AIC, BIC, MAIC (default) or MBIC

scale(#) 1 = rescaled criteria (default), 0 = standard

minlag(#) minimum lag length; default 0

maxlag(#) maximum lag length; default a Schwert-type rule

Description

bootur is a Stata port of the R package bootUR (Smeekes and
Wilms, 2023). It performs a wide range of bootstrap augmented Dickey-Fuller
(ADF) unit root tests for individual time series, several time series jointly,
and panel data. It also computes the standard (asymptotic) ADF test with
MacKinnon (1996) p-values, determines the order of integration of each series,
and provides differencing and missing-value/order diagnostics.

Data are supplied as one or more numeric variables in wide form (each variable
is one time series, rows are time). Series may have different starting and end
points (unbalanced): the leading/trailing missing values of each series are
handled automatically. Internal missing values (gaps) are not allowed.

Six bootstrap schemes are available. The moving-block (MBB) and sieve
(SB) bootstraps resample and cannot be used with unbalanced panels for
the joint tests; the wild schemes (BWB, DWB, AWB, SWB)
can. The union test takes the union of rejections over intercept/trend
and OLS/QD (GLS) detrending (Harvey, Leybourne and Taylor, 2012; Smeekes and
Taylor, 2012) and needs no choice of deterministic component. See
help bootur methods for the underlying algorithm and its
mapping to the equations in the references.

Subcommands

adf -- standard ADF test on one series, with an asymptotic
MacKinnon p-value. Options: deterministics(), criterion(),
scale(), minlag(), maxlag() and onestep (one-step
instead of the default two-step detrending).

ur -- bootstrap test on each series individually with no
multiple-testing correction. With level() a rejection flag is reported per
series. This is the general engine; union and bootadf are
single-series wrappers around it.

union -- bootstrap union test on a single series.

bootadf -- bootstrap ADF test on a single series
(union(0)); choose deterministics() and detrend().

fdr -- bootstrap tests controlling the false discovery rate
(Moon and Perron, 2012; Romano, Shaikh and Wolf, 2008).

sqt -- bootstrap sequential quantile test (Smeekes, 2015).
steps() gives an increasing list of units (integers) or quantiles
(values in [0,1]); e.g. steps(0 0.5 1) splits the series into two groups.

panel -- panel unit root test of the joint null that all
series contain a unit root, based on the group-mean statistic (Palm, Smeekes and
Urbain, 2011).

order -- determines the order of integration of each series by
a sequence of tests (Smeekes and Wijler, 2020) using method()
(ur, fdr, sqt, adf, union or bootadf).

diff -- differences each series by its own order in
orders() and stores the result as new variables.

plotmiss -- plots the pattern of observed and missing values.

plotorder -- bar chart of a vector of integration orders (e.g.
the matrix returned by bootur order).

Stored results

bootur ur/fdr/sqt/panel store in r():

Scalars

r(level) significance level

r(B) bootstrap replications

r(block_length) block length

r(statistic) test statistic (single series / panel)

r(p_value) p-value (single series / panel)

Matrices

r(statistic) test statistics (multiple series)

r(p_value) p-values (multiple series, ur only)

r(rejections) rejection flags (fdr, sqt)

r(sequence) sequence of tests (fdr, sqt)

r(indiv_stat) individual statistics, one column per detrending case

r(indiv_est) individual (gamma) estimates

r(indiv_lag) selected lag lengths

r(indiv_pval) individual bootstrap p-values

Macros

r(bootstrap) bootstrap method

r(criterion) information criterion

bootur adf stores r(statistic), r(p_value),
r(estimate), r(lag), r(N). bootur order stores the row
vector r(order).

Examples

Load the macroeconomic example data (five countries; GDP, consumption,
inflation, unemployment):

. use MacroTS

Standard ADF test on Belgian GDP with a linear trend:

. bootur adf GDP_BE, deterministics(trend)

Bootstrap union test on a single series:

. bootur union GDP_BE, bootstrap(AWB) b(1999)

Bootstrap unit root tests on several GDP series with a rejection flag:

. bootur ur GDP_BE GDP_DE GDP_FR GDP_NL GDP_UK, level(0.05)

Control the false discovery rate across all twenty series:

. bootur fdr GDP_* CONS_* HICP_* UR_*, level(0.10)

Sequential quantile test in two equal groups:

. bootur sqt GDP_BE GDP_DE GDP_FR GDP_NL GDP_UK, steps(0 0.5 1)

Panel test of the joint unit root null:

. bootur panel GDP_BE GDP_DE GDP_FR GDP_NL GDP_UK

Determine and plot the order of integration:

. bootur order GDP_* , method(ur)

. bootur plotorder r(order)

Visualise the missing-value pattern:

. bootur plotmiss GDP_NL HICP_BE UR_FR

References

Harvey, D.I., Leybourne, S.J., and Taylor, A.M.R. 2012. Testing for unit
roots in the presence of uncertainty over both the trend and initial condition.
Journal of Econometrics 169(2): 188-195.

MacKinnon, J.G. 1996. Numerical distribution functions for unit root and
cointegration tests. Journal of Applied Econometrics 11(6): 601-618.

Moon, H.R. and Perron, B. 2012. Beyond panel unit root tests.
Journal of Econometrics 169(1): 29-33.

Palm, F.C., Smeekes, S., and Urbain, J.-P. 2011. Cross-sectional
dependence robust block bootstrap panel unit root tests. Journal of
Econometrics 163(1): 85-104.

Smeekes, S. 2015. Bootstrap sequential tests to determine the order of
integration. Journal of Time Series Analysis 36(3): 398-415.

Smeekes, S. and Taylor, A.M.R. 2012. Bootstrap union tests for unit roots.
Econometric Theory 28(2): 422-456.

Smeekes, S. and Wilms, I. 2023. bootUR: An R package for bootstrap unit
root tests. Journal of Statistical Software 106(12): 1-39.

Author

Dr Merwan Roudane

merwanroudane920@gmail.com

github.com/merwanroudane

This command reproduces the methodology of the R package bootUR by
Stephan Smeekes and Ines Wilms. Please cite Smeekes and Wilms (2023).