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 ( |
M |
The maximum number of data sub-samples drawn at each recursive stage of the algorithm. The default is |
min.d |
The minimum distance between candidate change-point estimators;
if |
Q |
The maximum number of allowable change-points.
The default is |
max.iter |
The maximum number of candidate change-point models considered; if a model with the number of change-point estimators exceeding |
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 |
|
solution.path |
Locations of possible change-points in the mean of |
solution.set |
A list of candidate change-point models. Each model contains possible change-points in the mean of |
x |
Input vector |
type |
The type of the change-point model considered, which has value "const" here |
M |
Input parameter |
cands |
Matrix of dimensions |
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
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