| detect_regimes | R Documentation |
Detects regime changes in time series data using multiple methods including cumulative peaks, changepoint detection, variance shifts, threshold analysis, gradient changes, and entropy analysis.
detect_regimes(
data,
method = "smart",
sensitivity = "medium",
min_change,
window = 10,
peak = 2,
cumulative = 0.6
)
data |
[ |
method |
[
|
sensitivity |
[ |
min_change |
[ |
window |
[ |
peak |
[ |
cumulative |
[ |
An object of class regimes which is a tibble containing
the following columns:
value: Original time series data.
time: Original time points.
change: A logical vector indicating regime changes.
id: An integer regime identifier.
type: Type of change detected by the method.
magnitude: Magnitude of the change (method-specific interpretation)
confidence: Confidence in the detection
(method-specific interpretation, typically between 0 and 1, or NA)
stability: Categorical stability: "Stable", "Transitional", and
"Unstable".
score: A numeric stability score between 0 and 1.
set.seed(123)
ts_data <- stats::arima.sim(list(order = c(1, 1, 0), ar = 0.6), n = 200)
regimes <- detect_regimes(
data = ts_data,
method = "threshold",
sensitivity = "medium"
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.