Description Usage Arguments Details Value Author(s) See Also Examples
View source: R/sim_max_holder.R
This function simulates a sample of size N
of values of the Holder-like norm of the Wiener process discretised with step 1/n
.
The sample can then be used to find a suitable threshold for use with the self-normalised NSP.
1 | sim_max_holder(n, N, eps, c = exp(1 + 2 * eps))
|
n |
Number of equispaced sampling points for the Wiener process on |
N |
Desired number of simulated values of the norm. |
eps |
Parameter of the self-normalisation statistic as described in the paper. |
c |
Parameter of the self-normalisation statistic as described in the paper; use default if unsure how to set. |
The NSP algorithm is described in P. Fryzlewicz (2021) "Narrowest Significance Pursuit: inference for multiple change-points in linear models", preprint.
Sample of size N
containing the simulated norms.
Piotr Fryzlewicz, p.fryzlewicz@lse.ac.uk
nsp_selfnorm
, nsp_poly_selfnorm
, cov_dep_multi_norm
, cov_dep_multi_norm_poly
1 2 3 4 5 6 | set.seed(1)
g <- c(rep(0, 100), rep(10, 100), rep(0, 100))
x.g <- g + stats::rnorm(300) * seq(from = 1, to = 4, length = 300)
wn003 <- sim_max_holder(100, 500, .03)
lambda <- as.numeric(stats::quantile(wn003, .9))
nsp_poly_selfnorm(x.g, M = 100, thresh.val = lambda)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.