*! version 1.0.0 09jul2026

Title

urvol wbdf -- Wild-bootstrap (augmented) Dickey-Fuller / Phillips-Perron unit-root test

Syntax

urvol wbdf varname [if] [in] , [options]

Model
trend include a constant and linear trend (default: constant only)

noconstant no deterministic term

statistic(t|rho) base statistic: t (ADF t-ratio, default) or rho (coefficient)

Lag order (short-run dynamics)
lags(#) fixed number of augmenting lags

maxlags(#) maximum lag for information-criterion selection

ic(string) selection rule: maic (default), aic, bic or none

Bootstrap
reps(#) bootstrap replications (default 999)

wild(string) multiplier: rademacher (default), normal or mammen

seed(#) random-number seed

Reporting
graph plot the bootstrap null distribution with the observed statistic

gname(name) name for the saved graph

Description

urvol wbdf computes the standard augmented Dickey-Fuller (ADF)
t-statistic (or the coefficient / rho statistic) for the null of a unit
root, and obtains its p-value from a wild bootstrap. This is the
approach of Cavaliere and Taylor (2008, 2009): rather than comparing the
statistic to a fixed critical value - which is invalid when the innovation
variance changes over the sample (Cavaliere 2004) - the wild bootstrap
regenerates pseudo-samples that inherit the observed volatility pattern, so the
resulting p-value is asymptotically correct under a very wide class of
non-stationary volatility.

wbdf is the robust baseline of the family: it fixes the size
distortion of DF/PP but, because it does not reweight observations by their
volatility, its power is comparable to the ordinary DF test. For power
gains use beare or bzu.

Options

trend / noconstant select the deterministic component removed
from the data. With trend the regression includes 1 and t; the
default includes 1.

statistic(t|rho) chooses the base statistic. t is the ADF
t-ratio for the lagged-level coefficient; rho is the (normalized-bias)
coefficient statistic n((alpha-hat - 1)). Both are lower-tailed.

lags(#) fixes the number of augmenting lagged differences. If
omitted, the order is selected by ic() up to maxlags() (default
maxlag = floor(12(n/100)^0.25)). maic is the modified AIC of
Ng and Perron (2001). The selection is re-run inside every bootstrap
replication so the bootstrap fully mirrors the observed procedure.

reps(#) bootstrap replications (default 999; use >=999 for
reliable tail p-values).

wild(string) the external multiplier z*. rademacher
(±1 with equal probability, the default) is the standard choice for unit-root
wild bootstraps; normal draws N(0,1); mammen uses Mammen's (1993)
two-point distribution.

Method

Let the ADF regression be

Dy(t) = mu (+ beta t) + theta y(t-1) + sum_j gamma_j Dy(t-j) + e(t),

with observed statistic S (the t-ratio of theta or n theta-hat).
Restricted residuals e-hat(t) are obtained by imposing the unit root
(regressing Dy on the differenced deterministics only). For
b = 1,...,B: draw multipliers z*(t); form bootstrap errors
e*(t) = e-hat(t) z*(t); cumulate X*(t) = sum_ e*(s); and recompute
the statistic S*(b) from the same ADF regression (re-selecting the lag
if an information criterion is used). The one-sided bootstrap p-value is
the fraction of S*(b) <= S.

Because e*(t) multiplies the actual residuals, the pseudo-data reproduce the
sample's time-varying variance, delivering asymptotically valid inference under
non-stationary volatility (Cavaliere and Taylor 2008, 2009).

Examples

. webuse wpi1

. urvol wbdf ln_wpi, trend

. urvol wbdf ln_wpi, trend statistic(rho) reps(1999)

. urvol wbdf ln_wpi, trend maxlags(8) ic(maic) graph

. urvol wbdf ln_wpi, trend wild(mammen) seed(12345)

Stored results

urvol wbdf stores the following in r():

Scalars

r(stat) observed test statistic

r(p) one-sided wild-bootstrap p-value

r(lags) augmenting lags used

r(N) effective observations in the regression

r(reps) bootstrap replications

Macros

r(test) wbdf

r(statistic) t or rho

r(wild) multiplier scheme

References

Cavaliere, G. 2004. Unit root tests under time-varying variances.
Econometric Reviews 23(3): 259-292.
doi:10.1081/ETC-200028215.

Cavaliere, G., and A. M. R. Taylor. 2008. Bootstrap unit root tests for
time series with non-stationary volatility. Econometric Theory 24(1): 43-71.

Cavaliere, G., and A. M. R. Taylor. 2009. Heteroskedastic time series with
a unit root. Econometric Theory 25(5): 1228-1276.

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

Author

Dr Merwan Roudane

merwanroudane920@gmail.com

https://github.com/merwanroudane