Description Usage Arguments Details Value Author(s) References See Also Examples
Plots the optimal positioning of changepoints for data using the user specified method.
1 2 3 |
data |
The data that the user wants to plot. |
penalty |
Choice of "None", "SIC", "BIC", "MBIC", AIC", "Hannan-Quinn", "Manual" and "CROPS" penalties. If Manual is specified, the manual penalty is contained in the pen.value parameter. If CROPS is specified, the penalty range is contained in the pen.value parameter; note this is a vector of length 2 which contains the minimum and maximum penalty value. Note CROPS can only be used if the method is "PELT". The predefined penalties listed DO count the changepoint as a parameter, postfix a 0 e.g."SIC0" to NOT count the changepoint as a parameter. |
pen.value |
The value of the penalty when using the Manual penalty option. A vector of length 2 (min,max) if using the CROPS penalty. |
method |
Currently the only method is "PELT". |
class |
Logical. If TRUE then an object of class cpt is returned. |
minseglen |
Positive integer giving the minimum segment length (number of observations between changes), default is the minimum allowed by theory. |
nquantiles |
The number of quantiles to calculate. |
crop |
The amount of data pruned. |
family |
Option passed through to wavethresh functions. The option allows selection from which of a range of families the wavelet will come from. Please read wavethresh documentation for more details. |
filter.number |
Option passed through to wavethresh functions. Allows user to choose a filter. Please read wavethresh documentation for more details. |
binwidth |
If the periodogram smoothing is "RM" then this is the number of consecutive observations used in the running mean smooth. Currently the only periodogram smoothing supported is "RM". |
A nonparametric approach to detecting changes in variance within a time series which we demonstrate is resilient to de- partures from the assumption of Normality or presence of outliers. Our method is founded on a local estimate of the variance provided by the Locally Stationary Wavelet (LSW) framework. Within this setting, the structure of this local estimate of the variance will be piecewise constant if a time series has piecewise constant variance. Consequently, changes in the variance of a time series can be detected in a non-parametric setting.
If class=TRUE
then an object of S4 class "cpt" is returned. The slot cpts
contains the changepoints that are returned. For class=FALSE
the structure is as follows.
If data is a vector (single dataset) then a vector/list is returned depending on the value of method. If data is a matrix (multiple datasets) then a list is returned where each element in the list is either a vector or list depending on the value of method.
If method is PELT then a vector is returned containing the changepoint locations for the penalty supplied. If the penalty is CROPS then a list is returned with the elements:
cpt.out |
A data frame containing the value of the penalty value where the number of segmentations chages, the number of segmentations and the value of the cost at that penalty value. |
changepoints |
The optimal changepoints for the different penalty values startings with the lowest penalty value. |
Andrew Connell, Rebecca Killick
Change in Normal mean: Hinkley, D. V. (1970) Inference About the Change-Point in a Sequence of Random Variables, Biometrika 57, 1–17
PELT Algorithm: Killick R, Fearnhead P, Eckley IA (2012) Optimal detection of changepoints with a linear computational cost, JASA 107(500), 1590–1598
MBIC: Zhang, N. R. and Siegmund, D. O. (2007) A Modified Bayes Information Criterion with Applications to the Analysis of Comparative Genomic Hybridization Data. Biometrics 63, 22-32.
1 2 | x <- c(rnorm(100,50,1), rnorm(100,50,3))
changepoint:::nple(x)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.