Skip to contents

radf_common_cv simulates critical values for radf_common under its own null (no common explosive factor): an N-column panel of independent random walks, extracted to one principal component and tested exactly as radf_common does. Unlike radf_mc_cv – which has no dependence on panel width and was shown by independent validation to be badly undersized as a stand-in for radf_common's own null once N grows past a handful of series – this null distribution does depend on N, so N must match the panel radf_common was actually run on.

Usage

radf_common_cv(n, N, minw = NULL, nrep = 1000L, seed = NULL)

Arguments

n

A positive integer. The sample size (number of time periods).

N

A positive integer, at least 2. The panel width (number of series) that radf_common will be run on – the critical value depends on this, unlike radf_mc_cv.

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.seed before 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.

Value

A list with adf_cv, sadf_cv, gsadf_cv, badf_cv, bsadf_cv – the same shape as radf_mc_cv's return value, so it can be used as a drop-in cv argument for datestamp/tidy/autoplot on a radf_common result.

Status

[Experimental]

References

Chen, Y., Phillips, P. C. B., & Shi, S. (2023). Common Bubble Detection in Large Dimensional Financial Systems. Journal of Financial Econometrics, 21(4), 989-1063.

Examples

# \donttest{
cv <- radf_common_cv(n = 100, N = 5, minw = 20, nrep = 200)
tidy(cv)
#> # A tibble: 3 × 4
#>   sig     adf  sadf gsadf
#>   <fct> <dbl> <dbl> <dbl>
#> 1 90    0.529  1.87  2.37
#> 2 95    0.834  2.10  2.79
#> 3 99    1.21   2.90  3.07
# }