cov_dep_multi_norm: Simulate covariate-dependent multiscale sup-norm for use in...

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

View source: R/cov_dep_multi_norm.R

Description

This function simulates the multiscale sup-norm adjusted for the form of the covariates, as described in Section 5.3 of the paper. This is done for i.i.d. N(0,1) innovations.

Usage

1
cov_dep_multi_norm(x, N = 1000)

Arguments

x

The design matrix with the regressors (covariates) as columns.

N

Desired number of simulated values of the norm.

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

cov_dep_multi_norm_poly, sim_max_holder

Examples

1
2
3
4
5
set.seed(1)
g <- c(rep(0, 100), rep(2, 100))
x.g <- g + stats::rnorm(200)
mscale.norm.200 <- cov_dep_multi_norm(matrix(1, 200, 1), 100)
nsp_poly(x.g, 100, thresh.val = stats::quantile(mscale.norm.200, .95))

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