Description Usage Arguments Details Value Author(s) See Also Examples
View source: R/draw_rects_advanced.R
This function plots the intervals of significance returned by one of the nsp*
functions, at appropriate places along the graph of data.
It shows them as shaded rectangular areas (hence the name of the function) "attached" to the graph of the data. Note: the data sequence y
needs to have been plotted beforehand.
1 2 3 4 5 6 7 8 9 10 11 | draw_rects_advanced(
y,
nsp.obj,
half.height = NULL,
show.middles = TRUE,
col.middles = "blue",
lwd = 3,
density = 10,
col.rects = "red",
x.axis.start = 1
)
|
y |
The data. |
nsp.obj |
Object returned by one of the |
half.height |
Half-height of each rectangle; if |
show.middles |
Whether to display lines corresponding to the midpoints of the rectanlges (rough change-point location estimates). |
col.middles |
Colour of the midpoint lines. |
lwd |
Line width for the midpoint lines. |
density |
Density of the shading. |
col.rects |
Colour of the shading. |
x.axis.start |
Time index the x axis starts from. The NSP intervals of significance get shifted by |
The NSP algorithm is described in P. Fryzlewicz (2021) "Narrowest Significance Pursuit: inference for multiple change-points in linear models", preprint.
The function does not return a value.
Piotr Fryzlewicz, p.fryzlewicz@lse.ac.uk
1 2 3 4 5 6 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.