powered by
Implements the Shiryaev-Roberts procedure, which is asymptotically optimal for detecting changes with minimal detection delay.
shiryaev_roberts( data, type = "mean", prior = NULL, hazard = NULL, threshold = 100, mu0 = NULL, mu1 = NULL, sigma = NULL, ... )
List with changepoints and statistics
Numeric vector
Type of change to detect
Prior specification
Hazard prior
Detection threshold
Pre-change mean (if known)
Post-change mean (if known)
Known standard deviation (if applicable)
Additional arguments
Shiryaev, A. N. (1963). On Optimum Methods in Quickest Detection Problems. Theory of Probability and Its Applications.
data <- c(rnorm(100), rnorm(100, mean = 1)) result <- shiryaev_roberts(data)
Run the code above in your browser using DataLab