set.seed(123)
data <- c(rnorm(100, mean = 0), rnorm(100, mean = 3))
result <- detect_regimes(data)
print(result)
plot(result)
result <- detect_regimes(data, method = "bocpd",
prior = normal_gamma())
result <- detect_regimes(data, method = "cusum",
mode = "online", threshold = 5)
Run the code above in your browser using DataLab