| nsp_poly_selfnorm {nsp} | R Documentation |
Self-normalised Narrowest Significance Pursuit algorithm for piecewise-polynomial signals
Description
This function runs the Narrowest Significance Pursuit (NSP) algorithm on a data sequence y believed to follow the model
y_t = f_t + z_t, where f_t is a piecewise polynomial of degree deg, and z_t is noise. It returns localised regions (intervals) of the
domain, such that each interval must contain a change-point in the parameters of the polynomial f_t
at the global significance level alpha.
For any interval considered by the algorithm,
significant departure from parameter constancy is achieved if the multiscale
deviation measure (see Details for the literature reference) exceeds a threshold, which is either provided as input
or determined from the data (as a function of alpha). The function assumes independence, symmetry and finite variance of the
errors z_t, but little else; in particular they do not need to have a constant variance across t.
Usage
nsp_poly_selfnorm(
y,
M = 1000,
thresh.val = NULL,
power = 1/2,
min.size = 20,
alpha = 0.1,
deg = 0,
eps = 0.03,
c = exp(1 + 2 * eps),
overlap = FALSE
)
Arguments
y |
A vector containing the data sequence. |
M |
The minimum number of intervals considered at each recursive stage, unless the number of all intervals is smaller, in which case all intervals are used. |
thresh.val |
Numerical value of the significance threshold (lambda in the paper); or |
power |
A parameter for the (rough) estimator of the global sum of squares of z_t; the span of the moving window in that estimator is
|
min.size |
(See immediately above.) |
alpha |
Desired maximum probability of obtaining an interval that does not contain a change-point (the significance threshold will be determined as a function of this parameter). |
deg |
The degree of the polynomial pieces in f_t (0 for the piecewise-constant model; 1 for piecewise-linearity, etc.). |
eps |
Parameter of the self-normalisation statistic as described in the paper; use default if unsure how to set. |
c |
Parameter of the self-normalisation statistic as described in the paper; use default if unsure how to set. |
overlap |
If |
Details
The NSP algorithm is described in P. Fryzlewicz (2021) "Narrowest Significance Pursuit: inference for multiple change-points in linear models", preprint.
Value
A list with the following components:
intervals |
A data frame containing the estimated intervals of significance: |
threshold.used |
The threshold value. |
Author(s)
Piotr Fryzlewicz, p.fryzlewicz@lse.ac.uk
See Also
nsp_poly, nsp_poly, nsp_poly_ar, nsp_tvreg, nsp_selfnorm
Examples
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)
nsp_poly_selfnorm(x.g, 100)