sim_max_holder: Simulate Holder-like norm of the Wiener process for use in...

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/sim_max_holder.R

Description

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.

Usage

1
sim_max_holder(n, N, eps, c = exp(1 + 2 * eps))

Arguments

n

Number of equispaced sampling points for the Wiener process on [0,1].

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.

Details

The NSP algorithm is described in P. Fryzlewicz (2021) "Narrowest Significance Pursuit: inference for multiple change-points in linear models", preprint.

Value

Sample of size N containing the simulated norms.

Author(s)

Piotr Fryzlewicz, p.fryzlewicz@lse.ac.uk

See Also

nsp_selfnorm, nsp_poly_selfnorm, cov_dep_multi_norm, cov_dep_multi_norm_poly

Examples

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)

nsp documentation built on Dec. 21, 2021, 9:07 a.m.