radf_sbz_cv performs the HLST (2016) wild bootstrap. It is the same
algorithm as radf_wb_cv, applied to the WLS/kernel-volatility
statistic of radf_sbz instead of the classic supDF
statistic. It generates critical values that include the time-varying
badf_cv and bsadf_cv boundary that datestamp and
autoplot need, and not only the three scalar critical values that
summary() uses.
Usage
radf_sbz_cv(
data,
minw = NULL,
nboot = 499L,
kernel = c("gaussian", "uniform"),
h = NULL,
seed = NULL
)Arguments
- data
A univariate or multivariate numeric time series object, a numeric vector or matrix, or a data.frame. A column may have leading or trailing
NAvalues, which describes an unbalanced panel in which series enter or exit the sample at different times. Those periods are filled withNAinbadfandbsadfand excluded from theadf,sadfandgsadfof that series. InteriorNAvalues (a gap in the middle of a series) are not supported. When any series is padded in this way, the panel statistics (bsadf_panelandgsadf_panel) are not available, and the function returnsNAfor them with a warning.- minw
A positive integer. The minimum window size (default = \((0.01 + 1.8/\sqrt{T})T\), where T denotes the sample size).
- nboot
A positive integer. Number of bootstraps (default = 500L).
- kernel
Kernel for the spot-volatility estimator (eq. 6 of Harvey, Leybourne & Zu 2019),
"gaussian"(default, as in the paper) or"uniform".- h
Bandwidth for the spot-volatility estimator. The default is leave-one-out cross-validation over the search range of the paper.
- seed
An object specifying if and how the random number generator (rng) should be initialized. It is either NULL or an integer, which is passed to
set.seedbefore the simulation. If you set it, the value is saved as the "seed" attribute of the returned value. The default, NULL, leaves the state of the rng unchanged and returns .Random.seed as the "seed" attribute. Results are reproducible across the parallel and the non-parallel option when you use the same seed.
Value
An object of class radf_cv/sbz_cv/wb_cv: a list
with the critical values adf_cv, sadf_cv and gsadf_cv (one
row per series) and badf_cv and bsadf_cv (one array per series,
one row per recursion point).
References
Harvey, D. I., Leybourne, S. J., & Zu, Y. (2019). Testing explosive bubbles with time-varying volatility. Econometric Reviews, 38(10), 1131-1151.
See also
radf_sbz for the statistic that this function pairs with,
and radf_sbz_union for the bundled union-of-rejections test
against the classic supDF statistic. You cannot obtain that test from
this function and radf_wb_cv separately (see the Details of
radf_sbz_union for why).
Other critical values:
radf_common_cv(),
radf_mc_cv(),
radf_recovery_cv(),
radf_sb_cv(),
radf_sign_cv(),
radf_sign_dm_cv(),
radf_tt_cv(),
radf_wb_cv(),
radf_wb_ps_cv()
Examples
# \donttest{
y <- sim_psy1(150, seed = 1)
res <- radf_sbz(y, minw = 20)
cv <- radf_sbz_cv(y, minw = 20, nboot = 200, seed = 1)
summary(res, cv = cv)
#>
#> ── Summary (minw = 20, lag = 0) ────────── Wild Bootstrap (SBZ) (nboot = 200) ──
#>
#> series1 :
#> # A tibble: 3 × 5
#> stat tstat `90` `95` `99`
#> <fct> <dbl> <dbl> <dbl> <dbl>
#> 1 adf 0.103 1.14 1.56 1.81
#> 2 sadf 3.95 2.13 2.48 3.24
#> 3 gsadf 4.49 2.60 2.92 3.50
#>
datestamp(res, cv = cv)
#>
#> ── Datestamp (min_duration = 0) ──────────────────────── Wild Bootstrap (SBZ) ──
#>
#> series1 :
#> Start Peak End Duration Signal Ongoing
#> 1 64 82 102 38 positive FALSE
#> 2 109 111 113 4 positive FALSE
#> 3 114 114 115 1 positive FALSE
#>
# }
