model.sdll {breakfast}  R Documentation 
Estimating changepoints in the piecewiseconstant mean of a noisy data sequence via the Steepest Drop to Low Levels method
Description
This function estimates the number and locations of changepoints in the piecewiseconstant mean of a noisy data sequence via the Steepest Drop to Low Levels method.
Usage
model.sdll(
cptpath.object,
sigma = stats::mad(diff(cptpath.object$x)/sqrt(2)),
universal = TRUE,
th.const = NULL,
th.const.min.mult = 0.3,
lambda = 0.9
)
Arguments
cptpath.object 
A solutionpath object, returned by a sol.[name] routine. In particular, SDLL model selection should work well when cptpath.object is an object returned by the sol.wbs2 routine. Note that the field cptpath.object$x contains the input data sequence.

sigma 
An estimate of the standard deviation of the noise in the data cptpath.object$x . Can be a functional of cptpath.object$x or a specific value if known. The default is the Median Absolute Deviation of the vector diff(cptpath.object$x)/sqrt(2) , tuned to the Gaussian distribution. Note that model.sdll works particularly well when the noise is i.i.d. Gaussian.

universal 
If TRUE , then the threshold that decides if there are any changepoints is chosen automatically, so that the probability of typeI error (i.e. indicating changepoints if there are none) is approximately 1  alpha when the number M of intervals drawn in the sol.wbs2 solution path routine is 1000. If FALSE , then th.const must be specified.

th.const 
Only relevant if universal == FALSE ; in that case a numerical value must be provided. Used to create the threshold (applicable to the CUSUM magnitudes stored in cptpath.object ) that decides if there are any changepoints in the mean vector; that threshold is then th.const * sqrt(2 * log(n)) * sigma , where n is the length of the data vector cptpath.object$x .

th.const.min.mult 
A fractional multiple of the threshold, used to decide the lowest magnitude of CUSUMs from cptpath.object still considered by the SDLL model selection criterion as potentially changepointcarrying.

lambda 
Only relevant if universal == TRUE ; can be set to 0.9 or 0.95. The approximate probability of not detecting any changepoints if the truth does not contain any, when the number M of intervals drawn in the sol.wbs2 solution path routine is 1000.

Details
The Steepest Drop to Low Levels method is described in
"Detecting possibly frequent changepoints: Wild Binary Segmentation 2 and steepestdrop model selection", P. Fryzlewicz (2020), Journal of the Korean Statistical Society, 49, 1027–1070.
Value
An S3 object of class cptmodel
, which contains the following fields:
solution.path 
The solution path method used to obtain cptpath.object

model.selection 
The model selection method used to return the final changepoint estimators object, here its value is "sdll"

no.of.cpt 
The number of estimated changepoints in the piecewiseconstant mean of the vector cptpath.object$x

cpts 
The locations of estimated changepoints in the piecewiseconstant mean of the vector cptpath.object$x . These are the endpoints of the corresponding constantmean intervals

est 
An estimate of the piecewiseconstant 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 changepoints

References
P. Fryzlewicz (2020). Detecting possibly frequent changepoints: Wild Binary Segmentation 2 and steepestdrop model selection. Journal of the Korean Statistical Society, 49, 1027–1070.
See Also
sol.idetect
, 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.sdll(sol.wbs2(x))
[Package
breakfast version 2.3
Index]