model.gsa {breakfast}R Documentation

Estimating change-points in the piecewise-constant mean of a noisy data sequence with auto-regressive noise via gappy Schwarz algorithm

Description

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.

Usage

model.gsa(cptpath.object, p.max = 10, pen = log(length(cptpath.object$x))^1.01)

Arguments

cptpath.object

A solution-path object, returned by a sol.wcm routine. Note that the field cptpath.object$x contains the input data sequence.

p.max

The maximum AR order. The default is p.max = 10.

pen

Penalty used for the Schwarz criterion. log(length(cptpath.object$x))^1.01 is used as default.

Details

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.

Value

An S3 object of class cptmodel, which contains the following fields:

solution.path

The solution path method used to obtain cptpath.object, here its value is "wcm"

model.selection

The model selection method used to return the final change-point estimators object, here its value is "gsa"

no.of.cpt

The number of estimated change-points in the piecewise-constant mean of the vector cptpath.object$x

cpts

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

est

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

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

sol.wcm

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)
model.gsa(sol.wcm(x))

[Package breakfast version 2.4 Index]