This function estimates the number and locations of change-points in the piecewise-constant mean of a noisy data sequence with auto-regressive noise via gappy Schwarz algorithm
from a candidate model sequence generated by sol.wcm.
model.gsa(cptpath.object, p.max = 10, pen = log(length(cptpath.object$x))^1.01)An S3 object of class cptmodel, which contains the following fields:
The solution path method used to obtain cptpath.object, here its value is "wcm"
The model selection method used to return the final change-point estimators object, here its value is "gsa"
The number of estimated change-points in the piecewise-constant mean of the vector cptpath.object$x
The locations of estimated change-points in the piecewise-constant mean of the vector cptpath.object$x. These are the end-points of the corresponding constant-mean intervals
An estimate of the piecewise-constant mean of the vector cptpath.object$x; the values are the sample means of the data (replicated a suitable number of times) between each pair of consecutive detected change-points
A solution-path object, returned by a sol.wcm routine. Note that the field cptpath.object$x contains the input data sequence.
The maximum AR order. The default is p.max = 10.
Penalty used for the Schwarz criterion. log(length(cptpath.object$x))^1.01 is used as default.
From the largest to the smallest (i.e. empty) candidate models generated by sol.wcm,
gappy Schwarz algorithm locally evaluates the Schwarz criterion (SC, under piecewise constant signal + AR(p) noise model, with the AR order p to be determined adaptively) and its modification SC0
on each segment determined by the next smallest candidate model. It selects the larger model as the final model if over each segment, all newly introduced estimators are deemed `significant' according to SC and SC0; see Cho and Fryzlewicz (2023) for 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.
sol.wcm
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)
model.gsa(sol.wcm(x))
Run the code above in your browser using DataLab