powered by
Detects multiple changepoints using the Wild Binary Segmentation algorithm. Uses random intervals to improve detection in long time series.
wild_binary_segmentation( data, type = "both", penalty = "BIC", min_segment = 2, n_changepoints = "multiple", M = 5000, threshold = NULL, ... )
A list with:
Vector of detected changepoint locations
Number of changepoints detected
BIC value for the segmentation
Numeric vector or matrix of time series data
Type of change to detect: "mean", "variance", or "both"
Penalty for model complexity: "BIC", "AIC", "MBIC", or numeric
Minimum segment length
Expected number of changepoints: "single", "multiple", or integer
Number of random intervals to draw
Detection threshold for CUSUM statistic. If NULL, automatically determined
Additional arguments
Fryzlewicz, P. (2014). Wild Binary Segmentation for multiple change-point detection. Annals of Statistics, 42(6), 2243-2281.
data <- c(rnorm(100), rnorm(100, mean = 2), rnorm(100)) result <- wild_binary_segmentation(data)
Run the code above in your browser using DataLab