*! version 1.0.0 09jul2026

Title

urvol beare -- Beare (2017) kernel-rescaled Phillips-Perron unit-root test

Syntax

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

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

noconstant no deterministic term

Volatility & long-run variance
bandwidth(#) kernel bandwidth h for the volatility path, in (0,1) (default 0.1)

hacbw(#) Bartlett HAC bandwidth for the PP long-run variance (default: Newey-West rule)

Inference
bootstrap report wild-bootstrap p-values (default)

asymptotic report only the asymptotic DF critical values (constant case)

reps(#) bootstrap replications (default 999)

seed(#) random-number seed

Reporting
graph plot the estimated volatility path and the rescaled series

gname(name) name for the saved graph

Description

urvol beare implements the unit-root test of Beare (2017). The idea is to
rescale the differenced series by a non-parametric estimate of the
volatility path and then apply a Phillips-Perron (PP) test to the cumulated,
rescaled data. Beare shows that in the constant-mean case the rescaled statistic
recovers the ordinary Dickey-Fuller null distribution, so the classical
critical values apply - no simulation or bootstrap is strictly required. The
test is convenient and performs well even when the volatility path is
discontinuous (variance breaks).

Options

trend / noconstant select the deterministic component. With a
constant the rescaled statistic is pivotal (standard DF distribution). With
a trend it is not pivotal (Beare 2017, Theorem 4.3): use bootstrap
p-values (bootstrap, the default).

bandwidth(#) the bandwidth h of the Gaussian (Nadaraya-Watson)
kernel used to estimate the volatility path omega-hat(s/n). It must lie in
(0,1); Beare (2017) recommends 0.1, which controls size well. Larger h
oversmooths (approaching the homoskedastic PP test); smaller h undersmooths.

hacbw(#) the Bartlett-kernel bandwidth for the long-run variance in
the PP correction. The default is the Newey-West rule
floor(4(n/100)^(2/9)).

bootstrap (default) reports one-sided wild-bootstrap p-values,
valid in all deterministic cases including the non-pivotal trend case.
asymptotic instead reports only the asymptotic 5% DF critical values (valid
with a constant).

Method

Write the increments Dy(t) = y(t) - y(t-1). The volatility path is the
Nadaraya-Watson estimator (Beare 2017, eq. 4.2)

omega-hat(r)^2 = sum_t k(((t/n - r)/h)) u-hat(t)^2 / sum_t k(((t/n - r)/h)),

with a Gaussian kernel k and (detrended) residuals u-hat. The rescaled
series is

y*(t) = sum_ Dy(s) / omega-hat(s/n) (constant case),

and, with a trend, the increments are Schmidt-Phillips detrended before
rescaling (eq. 4.7). The reported statistics are the PP coefficient
Z-alpha and t-ratio Z-t computed on y*(t) regressed on its lag and
a constant (Cavaliere 2004, eq. 6):

Z-alpha = n((phi-hat - 1)) - (lambda-hat^2 - s-hat^2)/2 / [n^-2 sum (y*(t-1) - ybar*)^2].

In the constant case Z-alpha and Z-t have the standard DF
rho- and tau-distributions (Beare 2017, Theorem 4.2).

Examples

. webuse wpi1

. urvol beare ln_wpi, trend

. urvol beare ln_wpi, bandwidth(0.1) graph

. urvol beare ln_wpi, bandwidth(0.2) asymptotic

Stored results

urvol beare stores the following in r():

Scalars

r(zalpha) rescaled PP coefficient statistic

r(zt) rescaled PP t-statistic

r(p_zalpha) bootstrap p-value for Z-alpha

r(p_zt) bootstrap p-value for Z-t

r(bandwidth) volatility bandwidth h

r(hacbw) HAC bandwidth

r(N) number of increments

Macros

r(test) beare

References

Beare, B. K. 2017. Unit root testing with unstable volatility.
Journal of Time Series Analysis 39(6): 816-835.
doi:10.1111/jtsa.12279.

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

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.

Author

Dr Merwan Roudane

merwanroudane920@gmail.com

https://github.com/merwanroudane