model.sdll: Estimating change-points in the piecewise-constant mean of a...

View source: R/sdll.R

model.sdllR Documentation

Estimating change-points in the piecewise-constant mean of a noisy data sequence via the Steepest Drop to Low Levels method

Description

This function estimates the number and locations of change-points in the piecewise-constant 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 solution-path 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 change-points is chosen automatically, so that the probability of type-I error (i.e. indicating change-points 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 change-points 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 change-point-carrying.

lambda

Only relevant if universal == TRUE; can be set to 0.9 or 0.95. The approximate probability of not detecting any change-points 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 change-points: Wild Binary Segmentation 2 and steepest-drop 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 change-point estimators object, here its value is "sdll"

no.of.cpt

The number of estimated change-points in the piecewise-constant mean of the vector cptpath.object$x

cpts

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

est

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

References

P. Fryzlewicz (2020). Detecting possibly frequent change-points: Wild Binary Segmentation 2 and steepest-drop 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))

breakfast documentation built on Oct. 18, 2022, 5:08 p.m.