Learn R Programming

breakfast (version 2.5)

sol.wbs: Solution path generation via the Wild Binary Segmentation method

Description

This function arranges all possible change-in-mean features of the input vector in the order of importance, via the Wild Binary Segmentation (WBS) method.

Usage

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

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

The 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 "wbs" here

Arguments

x

A numeric vector containing the data to be processed

type

The model type considered. Currently type = "const" is the only accepted value. This assumes that the mean of the input vector is piecewise-constant.

M

The maximum number of all data sub-samples at the beginning of the algorithm. The default is M = 10000

systematic.intervals

When drawing the sub-intervals, whether to use a systematic (and fixed) or random scheme. The default is systematic.intervals = 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 algorithm is described in "Wild binary segmentation for multiple change-point detection", P. Fryzlewicz (2014), The Annals of Statistics, 42: 2243--2281.

References

P. Fryzlewicz (2014). Wild binary segmentation for multiple change-point detection. The Annals of Statistics, 42(6), 2243--2281.

R. Baranowski, Y. Chen & P. Fryzlewicz (2019). Narrowest-over-threshold detection of multiple change points and change-point-like features. Journal of the Royal Statistical Society: Series B, 81(3), 649--672.

See Also

sol.idetect, sol.idetect_seq, sol.not, sol.tguh, sol.wbs2

Examples

Run this code
r3 <- rnorm(1000) + c(rep(0,300), rep(2,200), rep(-4,300), rep(0,200))
sol.wbs(r3)

Run the code above in your browser using DataLab