plot-methods: ~~ Methods for Function plot in Package 'graphics' ~~

plot-methodsR 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 to col to change the colour of the changepoint line; cpt.width equivilent to lwd to change the width of the changepoint line; cpt.style equivilent to lty to change the style of the line.

signature(x = "cpt.range")

As for the cpt objects except for two optional arguments, ncpts and diagnostic. The ncpts option allows you to specify a plot of the segmentation with ncpts 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 in cpts.full(x). The diagnostic option when set to TRUE 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 using diagnostic=TRUE, identify the appropriate number of changes and then replot using ncpts 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 to col to change the colour of the changepoint line; cpt.width equivilent to lwd to change the width of the changepoint line; cpt.style equivilent to lty to change the style of the line.


changepoint documentation built on Nov. 4, 2024, 9:06 a.m.