Skip to contents

Simulates the asymptotic null distribution of the statistic of radf_sign. By Theorem 2 of Harvey, Leybourne & Zu (2020), this distribution does not depend on the volatility process at all (exact invariance). Like radf_tt_cv, and unlike radf_wb_cv, it therefore does not have to be recomputed for each dataset. A large n with the default nrep approximates the T -> Inf limit of the paper.

Usage

radf_sign_cv(n, minw = NULL, nrep = 2000L, seed = NULL)

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. It is either NULL or an integer, which is passed to set.seed before 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/sign_cv/mc_cv with the same structure as radf_mc_cv.

Details

You can check sadf_cv (single-supremum, r1 = 0 fixed) against the asymptotic (T = Inf) sPWY values in Table 1 of the paper. For minw/n = 0.1, the values at (10\ gsadf_cv (double-supremum) corresponds to the sPSY row: (2.933, 3.180, 3.655).

Status

[Experimental]

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_cv(n = 200, minw = 20)
tidy(cv)
#> # A tibble: 3 × 4
#>   sig     adf  sadf gsadf
#>   <fct> <dbl> <dbl> <dbl>
#> 1 90    0.926  2.43  3.48
#> 2 95    1.32   2.79  3.91
#> 3 99    2.05   3.30  4.93
# }