Learn R Programming

nsp (version 1.0.0)

cpt_importance: Change-point importance (prominence) plot

Description

This function produces a change-point prominence plot based on the NSP object provided. The heights of the bars are arranged in non-decreasing order and correspond directly to the lengths of the NSP intervals of significance. Each bar is labelled as s-e where s (e) is the start (end) of the corresponding NSP interval of significance, respectively. The change-points corresponding to the narrower intervals can be seen as more prominent.

Usage

cpt_importance(nsp.obj)

Arguments

nsp.obj

Object returned by one of the nsp* functions.

Value

The function does not return a value.

Details

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

See Also

draw_rects, draw_rects_advanced

Examples

Run this code
# NOT RUN {
set.seed(1)
f <- c(rep(0, 100), 1:100, rep(101, 100))
x.f <- f + 15 * stats::rnorm(300)
x.f.n <- nsp_poly(x.f, 100, "sim", deg=1)
cpt_importance(x.f.n)
# }

Run the code above in your browser using DataLab