Title: | Nonparametric Multiple Change Point Detection Using WBS |
---|---|
Description: | Implements the procedure from G. J. Ross (2021) - "Nonparametric Detection of Multiple Location-Scale Change Points via Wild Binary Segmentation" <arxiv:2107.01742>. This uses a version of Wild Binary Segmentation to detect multiple location-scale (i.e. mean and/or variance) change points in a sequence of univariate observations, with a strict control on the probability of incorrectly detecting a change point in a sequence which does not contain any. |
Authors: | Gordon J. Ross |
Maintainer: | Gordon J. Ross <[email protected]> |
License: | GPL-3 |
Version: | 0.2.0 |
Built: | 2024-11-26 06:44:09 UTC |
Source: | CRAN |
Returns the estimated number and locations of the change points in a sequence of univariate observations. For full details of how this procedure works, please see G. J. Ross (2021) - "Nonparametric Detection of Multiple Location-Scale Change Points via Wild Binary Segmentation" at https://arxiv.org/abs/2107.01742
detectChanges(y,alpha=0.05,prune=TRUE,M=10000,d=2,displayOutput=FALSE)
detectChanges(y,alpha=0.05,prune=TRUE,M=10000,d=2,displayOutput=FALSE)
y |
The sequence to test for change points |
alpha |
Required Type I error (i.e. false positive) rate. Can be set to either 0.05 or 0.01 |
prune |
Whether to prune potential excess change points via post-processing. Most likely should be left as TRUE. |
M |
Number of subsequences to sample during WBS. Should be left as M=10000 |
d |
Minimum number of observations between change points. Should be left as d=2. |
displayOutput |
If TRUE then will print some information while searching for change points |
A vector containing the location of the detected change points
Gordon J. Ross [email protected]
set.seed(100) y <- c(rnorm(30,0,1),rnorm(30,3,1), rnorm(30,0,1),rnorm(30,0,3)) detectChanges(y)
set.seed(100) y <- c(rnorm(30,0,1),rnorm(30,3,1), rnorm(30,0,1),rnorm(30,0,3)) detectChanges(y)