wbs.thresh.cpt {breakfast} | R Documentation |
This function estimates the number and locations of change-points in the piecewise-constant mean of the noisy input vector, using the (Adaptive) Wild Binary Segmentation method (see Details for the relevant literature references). The number of change-points is chosen via a thresholding-type criterion. The constant means between each pair of neighbouring change-points are also estimated. The method works best when the noise in the input vector is independent and identically distributed Gaussian.
wbs.thresh.cpt(x, sigma = stats::mad(diff(x)/sqrt(2)), universal = TRUE, M = NULL, th.const = NULL, th.const.min.mult = 0.825, adapt = TRUE, lambda = 0.9)
x |
A vector containing the data in which you wish to find change-points. |
sigma |
The estimate or estimator of the standard deviation of the noise in |
universal |
If |
M |
The number of randomly selected sub-segments of the data on which to build
the CUSUM statistics in the (Adaptive) Wild Binary Segmentation algorithm.
If you are using Adaptive Wild
Binary Segmentation ( |
th.const |
Tuning parameter. Change-points are
estimated by thresholding [of the (Adaptive) WBS CUSUMs of |
th.const.min.mult |
If |
adapt |
If |
lambda |
See the description for the |
The change-point detection algorithms used in wbs.thresh.cpt
are: standard
Wild Binary Segmentation [see "Wild Binary Segmentation for multiple
change-point detection", P. Fryzlewicz (2014), Annals of Statistics, 42, 2243-2281]
and Adaptive Wild Binary Segmentation [see "Data-adaptive Wild Binary Segmentation",
P. Fryzlewicz (2017), in preparation as of September 28th, 2017].
A list with the following components:
est |
The estimated piecewise-constant mean of |
no.of.cpt |
The estimated number of change-points in the piecewise-constant mean of |
cpt |
The estimated locations of change-points in the piecewise-contant mean of |
Piotr Fryzlewicz, p.fryzlewicz@lse.ac.uk
segment.mean
, wbs.bic.cpt
,
wbs.cpt
, tguh.cpt
, hybrid.cpt
, wbs.K.cpt
teeth <- rep(rep(0:1, each=5), 20) teeth.noisy <- teeth + rnorm(200)/5 teeth.cleaned <- wbs.thresh.cpt(teeth.noisy) ts.plot(teeth.cleaned$est) teeth.cleaned$no.of.cpt teeth.cleaned$cpt