model.thresh {breakfast} | R Documentation |
Estimating change-points in the piecewise-constant mean of a noisy data sequence via thresholding
Description
This function estimates the number and locations of change-points in the piecewise-constant mean of a noisy data sequence via thresholding.
Usage
model.thresh(
cptpath.object,
sigma = stats::mad(diff(cptpath.object$x)/sqrt(2)),
th_const = 1.15
)
Arguments
cptpath.object |
A solution-path object, returned by a |
sigma |
An estimate of the standard deviation of the noise in the data |
th_const |
A positive real number with default value equal to 1. It is used to define the threshold for the detection process. |
Value
An S3 object of class cptmodel
, which contains the following fields:
solution.path |
The solution path method used to obtain |
model.selection |
The model selection method used to return the final change-point estimators object, here its value is |
no.of.cpt |
The number of estimated change-points in the piecewise-constant mean of the vector |
cpts |
The locations of estimated change-points in the piecewise-constant mean of the vector |
est |
An estimate of the piecewise-constant mean of the vector |
See Also
sol.idetect_seq
, sol.idetect_seq
, sol.not
, sol.tguh
, sol.wbs
, sol.wbs2
, breakfast
Examples
f <- rep(rep(c(0, 1), each = 50), 10)
x <- f + rnorm(length(f))
model.thresh(sol.idetect_seq(x))