plot.mosum.cpts {mosum} | R Documentation |
Plotting the output from MOSUM procedure
Description
Plotting method for S3 objects of class mosum.cpts
Usage
## 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 |
display |
which to be plotted against the change point estimators; possible values are
|
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 |
xlab |
graphical parameter |
... |
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
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")
[Package mosum version 1.2.7 Index]