plot.mosum.cpts: Plotting the output from MOSUM procedure

Description Usage Arguments Details Examples

View source: R/mosum.R

Description

Plotting method for S3 objects of class mosum.cpts

Usage

1
2
3
4
5
6
7
8
9
## S3 method for class 'mosum.cpts'
plot(
  x,
  display = c("data", "mosum")[1],
  cpts.col = "red",
  critical.value.col = "blue",
  xlab = "Time",
  ...
)

Arguments

x

a mosum.cpts object

display

which to be plotted against the change point estimators; possible values are

  • "data"input time series is plotted along with the estimated piecewise constant signal

  • "mosum"scaled MOSUM detector values are plotted

cpts.col

a specification for the color of the vertical lines at the change point estimators, see par

critical.value.col

a specification for the color of the horizontal line indicating the critical value, see par; use iff display = "mosum"

xlab

graphical parameter

...

additional graphical arguments, see plot and abline

Details

The location of each change point estimator is plotted as a vertical line against the input time series and the estimated piecewise constant signal (display = "data") or MOSUM detector values (display = "mosum").

Examples

1
2
3
4
5
x <- testData(lengths = rep(100, 3), means = c(0, 5, -2), sds = rep(1, 3), seed = 1234)$x
m <- mosum(x, G = 40)
par(mfrow = c(2, 1), mar = c(2.5, 2.5, 2.5, .5))
plot(m, display = "data")
plot(m, display = "mosum")

mosum documentation built on June 25, 2021, 5:08 p.m.

Related to plot.mosum.cpts in mosum...