breakfast {breakfast}  R Documentation 
This function estimates the number and locations of changepoints in a data sequence, which is modelled as a piecewiseconstant function plus i.i.d. Gaussian noise. This is carried out via a twostage procedure combining solution path generation and model selection methodologies.
breakfast(x, solution.path = NULL, model.selection = NULL)
x 
A numeric vector containing the data to be processed 
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

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

Please also take a look at the vignette for tips/suggestions/examples of using the breakfast package.
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 changepoint estimators object
no.of.cpt The number of estimated changepoints in the piecewiseconstant mean of the vector cptpath.object$x
cpts The locations of estimated changepoints in the piecewiseconstant mean of the vector cptpath.object$x
. These are the endpoints of the corresponding constantmean intervals
est An estimate of the piecewiseconstant 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 changepoints
A. Anastasiou & P. Fryzlewicz (2019). Detecting multiple generalized changepoints by isolating single ones. arXiv preprint arXiv:1901.10852.
R. Baranowski, Y. Chen & P. Fryzlewicz (2019). Narrowestoverthreshold detection of multiple change points and changepointlike features. Journal of the Royal Statistical Society: Series B, 81(3), 649–672.
H. Cho & C. Kirch (2021) Twostage data segmentation permitting multiscale change points, heavy tails and dependence. arXiv preprint arXiv:1910.12486.
P. Fryzlewicz (2014). Wild binary segmentation for multiple changepoint detection. The Annals of Statistics, 42(6), 2243–2281.
P. Fryzlewicz (2020). Detecting possibly frequent changepoints: Wild Binary Segmentation 2 and steepestdrop model selection. To appear in Journal of the Korean Statistical Society.
P. Fryzlewicz (2018). Tailgreedy bottomup data decompositions and fast multiple changepoint detection. The Annals of Statistics, 46(6B), 3390–3421.
f < rep(rep(c(0, 1), each = 50), 10) x < f + rnorm(length(f)) * .5 breakfast(x)