plot-methods {changepoint} | R Documentation |
~~ Methods for Function plot in Package ‘graphics’ ~~
Description
~~ Methods for function plot
in Package ‘graphics’ ~~
Methods
signature(x = "ANY")
-
Generic plot function, see graphics package description using ?plot
signature(x = "cpt")
-
Plots the data and identifies the changepoints using vertical lines (change in variance), horizontal lines (change in mean). Optional arguments to control the lines:
cpt.col
equivilent tocol
to change the colour of the changepoint line;cpt.width
equivilent tolwd
to change the width of the changepoint line;cpt.style
equivilent tolty
to change the style of the line. signature(x = "cpt.range")
-
As for the
cpt
objects except for two optional arguments,ncpts
anddiagnostic
. Thencpts
option allows you to specify a plot of the segmentation withncpts
changepoints in, i.e. the optimal may be specified as 10 changes but you want to plot the segmentation with 5 changes (provided a segmentation with 5 changes is listed incpts.full(x)
. Thediagnostic
option when set toTRUE
plots the number of changepoints in each segmentation against the penalty values that give that number of changepoints. This can aide the decision on the number of changepoints as when a true changepoint is added the cost decreases considerably so it creates a stable region where several penalty values give the same number of changepoints, but when a changepoint due to noise is added the change in cost is small and so a small change in penalty value can vary the number of changes a lot. This is akin to a scree plot in principal component analysis. The idea is that someone may choose to create a plot usingdiagnostic=TRUE
, identify the appropriate number of changes and then replot usingncpts
to visualize that segmentation. signature(x = "cpt.reg")
-
Plots the combined regressors (model fit) against the response and identifies the changepoints using vertical lines. Optional arguments to control the lines:
cpt.col
equivilent tocol
to change the colour of the changepoint line;cpt.width
equivilent tolwd
to change the width of the changepoint line;cpt.style
equivilent tolty
to change the style of the line.