breakfast {breakfast} | R Documentation |
Methods for fast detection of multiple change-points
Description
This function estimates the number and locations of change-points in a univariate data sequence, which is modelled as (i) a piecewise-constant function plus i.i.d. Gaussian noise, (ii) a piecewise-constant function plus autoregressive time series, (iii) a piecewise-linear and continuous function plus i.i.d. Gaussian noise, or (iv) a piecewise-linear and discontinuous function plus i.i.d. Gaussian noise. This is carried out via a two-stage procedure combining solution path generation and model selection methodologies.
Usage
breakfast(
x,
type = c("const", "lin.cont", "lin.discont"),
solution.path = NULL,
model.selection = NULL
)
Arguments
x |
A numeric vector containing the data to be processed |
type |
The type of change-point models fitted to the data; currently supported models are: piecewise constant signals ( |
solution.path |
A string or a vector of strings containing the name(s) of solution path generating method(s);
if individual methods are accessed via this option, default tuning parameters are used.
Alternatively, you can directly access each solution path generating method via When When If
|
model.selection |
A string or a vector of strings containing the name(s) of model selection method(s);
if individual methods are accessed via this option, default tuning parameters are used.
Alternatively, you can directly access each model selection method via
|
Details
Please also take a look at the vignette for tips/suggestions/examples of using the breakfast package.
Value
An S3 object of class breakfast.cpts
, which contains the following fields:
- x
Input vector
x
- cptmodel.list
A list containing S3 objects of class
cptmodel
; each contains the following fields:
- solution.path
The solution path method used
- model.selection
The model selection method used to return the final change-point estimators object
- 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
A. Anastasiou & P. Fryzlewicz (2022) Detecting multiple generalized change-points by isolating single ones. Metrika, 85(2), 141–174.
R. Baranowski, Y. Chen & P. Fryzlewicz (2019) Narrowest-over-threshold detection of multiple change points and change-point-like features. Journal of the Royal Statistical Society: Series B, 81(3), 649–672.
H. Cho & C. Kirch (2022) Two-stage data segmentation permitting multiscale change points, heavy tails and dependence. Annals of the Institute of Statistical Mathematics, 74(4), 653–684.
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.
P. Fryzlewicz (2014) Wild binary segmentation for multiple change-point detection. The Annals of Statistics, 42(6), 2243–2281.
P. Fryzlewicz (2018) Tail-greedy bottom-up data decompositions and fast multiple change-point detection. The Annals of Statistics, 46(6B), 3390–3421.
P. Fryzlewicz (2020) Detecting possibly frequent change-points: Wild Binary Segmentation 2 and steepest-drop model selection. Journal of the Korean Statistical Society, 49(4), 1027–1070.
Examples
f <- rep(rep(c(0, 1), each = 50), 10)
x <- f + rnorm(length(f)) * .5
breakfast(x)