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.
sol.wcm(
x,
type = "const",
M = 100,
min.d = NULL,
Q = floor(log(length(x))^1.9),
max.iter = 5
)An S3 object of class cptpath, which contains the following fields:
TRUE, i.e., the change-point outputs are nested
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
A list of candidate change-point models. Each model contains possible change-points in the mean of x; this is used by model.gsa
Input vector x
The type of the change-point model considered, which has value "const" here
Input parameter M
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
The method used, which has value "wcm" here
A numeric vector containing the data to be processed.
The type of change-point models fitted to the data; currently the class of piecewise constant signals (type = "const") is supported.
The maximum number of data sub-samples drawn at each recursive stage of the algorithm. The default is M = 100.
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).
The maximum number of allowable change-points.
The default is Q = floor(log(length(x))^1.9).
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.
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.
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.
model.gsa
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
Run the code above in your browser using DataLab