
Monte Carlo Critical Values for the Recursively Demeaned Sign-Based Test
Source:R/radf_sign.R
radf_sign_dm_cv.RdSimulates the asymptotic null distribution of radf_sign_dm's
statistic. Like radf_sign_cv, this distribution does not
depend on the volatility process (exact invariance, HLZ 2020's Theorem 2
analogue for this variant), so it does not need to be recomputed per
dataset.
Arguments
- n
A positive integer. The sample size.
- minw
A positive integer. The minimum window size (default = \((0.01 + 1.8/\sqrt(T))T\), where T denotes the sample size).
- nrep
A positive integer. The number of Monte Carlo simulations.
- seed
An object specifying if and how the random number generator (rng) should be initialized. Either NULL or an integer will be used in a call to
set.seedbefore simulation. If set, the value is saved as "seed" attribute of the returned value. The default, NULL, will not change rng state, and return .Random.seed as the "seed" attribute. Results are reproducible across the parallel and non-parallel option when the same seed is used.
References
Harvey, D. I., Leybourne, S. J., & Zu, Y. (2020). Sign-based unit root tests for explosive financial bubbles in the presence of deterministically time-varying volatility. Econometric Theory, 36(1), 122-169.
Examples
# \donttest{
cv <- radf_sign_dm_cv(n = 100, minw = 20)
tidy(cv)
#> # A tibble: 3 × 4
#> sig adf sadf gsadf
#> <fct> <dbl> <dbl> <dbl>
#> 1 90 0.921 2.35 2.83
#> 2 95 1.28 2.69 3.20
#> 3 99 2.03 3.49 3.93
# }