View source: R/Finalised_coding.R
| cpt_ic_plm | R Documentation |
This function performs the Isolate-Detect methodology based on an information criterion approach, in order to detect multiple change-points in the slope of a given data sequence. The relevant literature reference is given in details.
cpt_ic_plm(
x,
th_const = 1.25,
Kmax = 200,
penalty = c("ssic_pen", "sic_pen"),
points = 10
)
x |
A numeric vector containing the data in which you would like to find change-points. |
th_const |
A positive real number with default value equal to 1.25. It is used to define the threshold value that will be used at the first step of the model selection based Isolate-Detect method. |
Kmax |
A positive integer with default value equal to 200. It defines the maximum number of change-points allowed to be detected. In addition, it is the maximum allowed number of estimated change-points in the solution path. |
penalty |
A character vector with names of penalty functions used. |
points |
A positive integer with default value equal to 10. It defines the distance between two consecutive end- or start-points of the right- or left-expanding intervals, respectively. |
The approach followed in cpt_ic_plm in order to detect the change-points
is based on identifying the set of change-point that minimise an information criterion.
The obtained set of change-points is a subset of the solution path, which is given
by sol_path_plm. More details can be found in “Detecting multiple generalized
change-points by isolating single ones”, Anastasiou and Fryzlewicz (2017), preprint.
A list with the following components:
sol_path A vector containing the solution path.
ic_curve A list with values of the chosen information criteria.
cpt_ic A list with the change-points detected for each information
criterion considered.
no_cpt_ic The number of change-points detected for each information
criterion considered.
Andreas Anastasiou, anastasiou.andreas@ucy.ac.cy
ID_plm and ID, which employ this function.
In addition, see cpt_ic_pcm for the case of detecting changes in
the mean of a piecewise-constant signal using the information criterion based
approach.
single.cpt <- c(seq(0, 999, 1), seq(998.5, 499, -0.5))
single.cpt.noise <- single.cpt + rnorm(2000)
cpt.single.ic <- cpt_ic_plm(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.ic <- cpt_ic_plm(three.cpt.noise)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.