sol.wcm {breakfast}R Documentation

Solution path generation via the Wild Contrast Maximisation 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.wcm(
  x,
  type = "const",
  M = 100,
  min.d = NULL,
  Q = floor(log(length(x))^1.9),
  max.iter = 5
)

Arguments

x

A numeric vector containing the data to be processed.

type

The type of change-point models fitted to the data; currently the class of piecewise constant signals (type = "const") is supported.

M

The maximum number of data sub-samples drawn at each recursive stage of the algorithm. The default is M = 100.

min.d

The minimum distance between candidate change-point estimators; if min.d = NULL, it is set to be max(20, 10 + ceiling(log(length(x))^1.1).

Q

The maximum number of allowable change-points. The default is Q = floor(log(length(x))^1.9).

max.iter

The maximum number of candidate change-point models considered; if a model with the number of change-point estimators exceeding Q is required to generate the sequence of required candidate models, this argument is ignored. The default is max.iter = 5.

Details

The Wild Contrast Maximisation (WCM) algorithm generates a nested sequence of candidate models by identifying large gaps in the solution path generated by WBS2, which aids the model selection step in the presence of large random fluctuations due to serial dependence. See Cho and Fryzlewicz (2023) for further details.

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; this is not used by model.gsa

solution.set

A list of candidate change-point models. Each model contains possible change-points in the mean of x; this is used by model.gsa

x

Input vector x

type

The type of the change-point model considered, which has value "const" here

M

Input parameter M

cands

Matrix of dimensions Q 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 "wcm" here

References

H. Cho & P. Fryzlewicz (2024) Multiple change point detection under serial dependence: Wild contrast maximisation and gappy Schwarz algorithm. Journal of Time Series Analysis, 45(3): 479–494.

See Also

model.gsa

Examples

set.seed(111)
f <- rep(c(0, 5, 2, 8, 1, -2), c(100, 200, 200, 50, 200, 250))
x <- f + arima.sim(list(ar = c(.75, -.5), ma = c(.8, .7, .6, .5, .4, .3)), n = length(f), sd = 1)
sol.wcm(x)$solution.set

[Package breakfast version 2.4 Index]