Description Usage Arguments Details Value References See Also Examples
View source: R/main.R View source: R/RcppExports.R
Simulate quantiles of the multiscale statistics under the null hypothesis.
1 | msQuantile(n, alpha = c(0.1), nsim = 5000, verbose = TRUE, is.sim = (n < 1e4), ...)
|
n |
number of observations |
alpha |
significance level; the (1- |
nsim |
numer of Monte Carlo simulations |
is.sim |
logical. If |
verbose |
logical. If |
... |
further arguments passed to function |
Empirically, it turns out that the (1-alpha
)-quantile of the multiscale statistic converges fast to that of the limit distribution as the number of samples n
increases. Thus, for the sake of computational efficiency, the quantile with n
= 10,000 are used by default for that with n
> 10,000, which has already been precomputed and stored. Of course, for arbitrary sample size n
, one can always simulate the quantile by setting is.sim = TRUE
, and use the precomputed value by setting is.sim = FALSE
. For a given sample size n
, simulations are once computed, and then automatically recorded in main memory for later usage.
A vector of length length(alpha)
is returned, the same structure as returned by funtion quantile
. See Li et al. (2016) for further details.
Li, H., Munk, A., Sieling, H., and Walther, G. (2016). The essential histogram. arXiv:1612.07216.
1 2 3 4 5 6 7 | n = 100 # number of observations
nsim = 100 # number of simulations
alpha = c(0.1, 0.9) # significance level
q = msQuantile(n, alpha, nsim)
print(q)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.