sol.wbs2 {breakfast}R Documentation

Solution path generation via the Wild Binary Segmentation 2 method

Description

This function arranges all possible change-points in the mean of the input vector in the order of importance, via the Wild Binary Segmentation 2 method.

Usage

sol.wbs2(x, type = "const", M = 1000, systematic.intervals = TRUE, seed = NULL)

Arguments

x

A numeric vector containing the data to be processed.

type

The model type considered. type = "const" means piecewise-constant; this is the only type currently supported in sol.wbs2

M

The maximum number of data sub-samples drawn at each recursive stage of the algorithm. The default is M = 1000. Setting M = 0 executes the standard binary segmentation.

systematic.intervals

Whether data sub-intervals for CUSUM computation are drawn systematically (TRUE; start- and end-points taken from an approximately equispaced grid) or randomly (FALSE; obtained uniformly with replacement). The default is TRUE.

seed

If a random scheme is used, a random seed can be provided so that every time the same sets of random sub-intervals would be drawn. The default is seed = NULL, which means that this option is not set

Details

The Wild Binary Segmentation 2 algorithm 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 cptpath, which contains the following fields:

solutions.nested

TRUE, i.e., the change-point outputs are nested

solution.path

Locations of possible change-points in the mean of x, arranged in decreasing order of change-point importance

solution.set

Empty list

x

Input vector x

type

Input parameter type

M

Input parameter M

cands

Matrix of dimensions length(x) - 1 by 4. The first two columns are (start, end)-points of the detection intervals of the corresponding possible change-point location in the third column. The fourth column is a measure of strength of the corresponding possible change-point. The order of the rows is the same as the order returned in solution.path

method

The method used, which has value "wbs2" here

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

Examples

r3 <- rnorm(1000) + c(rep(0,300), rep(2,200), rep(-4,300), rep(0,200))
sol.wbs2(r3)

[Package breakfast version 2.4 Index]