This function estimates the number and locations of change-points in the piecewise-constant mean of a noisy data sequence via the localised pruning method, which performs a Schwarz criterion-based model selection on the given candidate set in a localised way.
model.lp(
cptpath.object,
min.d = 5,
penalty = c("log", "polynomial"),
pen.exp = 1.01,
do.thr = TRUE,
th.const = 0.5
)An S3 object of class cptmodel, which contains the following fields:
The solution path method used to obtain cptpath.object
The model selection method used to return the final change-point estimators object, here its value is "lp"
The number of estimated change-points in the piecewise-constant mean of the vector cptpath.object$x
The locations of estimated change-points in the piecewise-constant mean of the vector cptpath.object$x. These are the end-points of the corresponding constant-mean intervals
An estimate of the piecewise-constant mean of the vector cptpath.object$x; the values are the sample means of the data (replicated a suitable number of times) between each pair of consecutive detected change-points
A solution-path object, returned by a sol.[name] routine. Note that the field cptpath.object$x contains the input data sequence.
A number specifying the minimal spacing between change points; min.d = 5 by default
A string specifying the type of penalty term to be used in Schwarz criterion; possible values are:
"log"Use penalty = log(length(x))^pen.exp
"polynomial"Use penalty = length(x)^pen.exp
Exponent for the penalty term (see penalty)
If do.thr = TRUE, mild threshoding on the CUSUM test statistics is performed after internal standardisation step in order to "pre-prune down" the candidates
A constant multiplied to sqrt(2*log(length(x))) to form a mild threshold; if not supplied, a default value (0.5* the value suggested in Fryzlewicz (2020)) is used,
see th.const in model.sdll
Further information can be found in Cho and Kirch (2022).
H. Cho & C. Kirch (2022) Two-stage data segmentation permitting multiscale change points, heavy tails and dependence. Annals of the Institute of Statistical Mathematics, 74(4), 653--684.
sol.idetect, sol.idetect_seq, sol.not, sol.tguh, sol.wbs, sol.wbs2, breakfast
f <- rep(rep(c(0, 1), each = 50), 10)
x <- f + rnorm(length(f)) * .5
model.lp(sol.not(x))
Run the code above in your browser using DataLab