Description Usage Arguments Details Value Author(s) See Also Examples
View source: R/Finalised_coding.R
This function estimates the number and locations of multiple changepoints in the noisy,
continuous and piecewiselinear input vector x
, using the IsolateDetect methodology. The noise
follows the normal distribution. The estimated signal, as well as the solution path defined
in sol_path_cplm
are also given. The function is a hybrid between the thresholding
approach of win_cplm_th
and the information criterion approach of
cplm_ic
and estimates the changepoints taking into account both these
approaches (see Details for more information and the relevant literature reference).
1  ID_cplm(x, thr_id = 1.4, th_ic_id = 1.25, pointsth = 3, pointsic = 10)

x 
A numeric vector containing the data in which you would like to find changepoints. 
thr_id 
A positive real number with default value equal to 1.4. It is
used to define the threshold, if the thresholding approach is to be followed; see

th_ic_id 
A positive real number with default value equal to 1.25. It is
useful only if the model selection based IsolateDetect method is to be followed
and it is used to define the threshold value that will be used at the first step
(changepoint overestimation) of the model selection approach described in

pointsth 
A positive integer with default value equal to 3. It is used only when the threshold based approach is to be followed and it defines the distance between two consecutive end or startpoints of the right or leftexpanding intervals, respectively. 
pointsic 
A positive integer with default value equal to 10. It is used only when the information criterion based approach is to be followed and it defines the distance between two consecutive end or startpoints of the right or leftexpanding intervals, respectively. 
Firstly, this function detects the changepoints using win_cplm_th
.
If the estimated number of changepoints is larger than 100, then the
result is returned and we stop. Otherwise, ID_cplm
proceeds to detect the
changepoints using cplm_ic
and this is what is returned. To sum up,
ID_cplm
returns a result based on cplm_ic
if the estimated number
of changepoints is less than 100. Otherwise, the result comes from thresholding.
More details can be found in “Detecting multiple generalized changepoints by
isolating single ones”, Anastasiou and Fryzlewicz (2018), preprint.
A list with the following components:
cpt  A vector with the detected changepoints. 
no_cpt  The number of changepoints detected. 
fit  A numeric vector with the estimated continuous piecewiselinear signal. 
solution_path  A vector containing the solution path. 
Andreas Anastasiou, a.anastasiou@lse.ac.uk
win_cplm_th
and cplm_ic
which are the functions that
ID_cplm
is based on. In addition, see ID_pcm
for the case of detecting changes
in the mean of a piecewiseconstant signal. The main function ID
of the package
employs ID_cplm
.
1 2 3 4 5 6 7 8 9 10 11  single.cpt < c(seq(0, 999, 1), seq(998.5, 499, 0.5))
single.cpt.noise < single.cpt + rnorm(2000)
cpt.single < ID_cplm(single.cpt.noise)
three.cpt < c(seq(0, 499, 1), seq(498.5, 249, 0.5), seq(250,1249,2), seq(1248,749,1))
three.cpt.noise < three.cpt + rnorm(2000)
cpt.three < ID_cplm(three.cpt.noise)
multi.cpt < rep(c(seq(0,49,1), seq(48,0,1)),20)
multi.cpt.noise < multi.cpt + rnorm(1980)
cpt.multi < ID_cplm(multi.cpt.noise)

Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.