cov_dep_multi_norm_poly {nsp} | R Documentation |
Simulate covariate-dependent multiscale sup-norm for use in NSP, for piecewise-polynomial models
Description
This function simulates the multiscale sup-norm adjusted for the form of the covariates, as described in Section 5.3
of the paper, for piecewise-polynomial models of degree deg
. This is done for i.i.d. N(0,1) innovations.
Usage
cov_dep_multi_norm_poly(n, deg, N = 10000)
Arguments
n |
The data length (for which the multiscale norm is to be simulated) |
deg |
The degree of the polynomial model (0 for the piecewise-constant model; 1 for piecewise-linearity, etc.). |
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
, sim_max_holder
Examples
set.seed(1)
g <- c(rep(0, 100), rep(2, 100))
x.g <- g + stats::rnorm(200)
mscale.norm.200 <- cov_dep_multi_norm_poly(200, 0, 100)
nsp_poly(x.g, 100, thresh.val = stats::quantile(mscale.norm.200, .95))
[Package nsp version 1.0.0 Index]