powered by
Plot Time Series Data with Detected Regime Stability
# S3 method for regimes plot(x, points = FALSE, ...)
A ggplot object.
ggplot
[regimes] Output of detect_regimes().
regimes
detect_regimes()
[logical(1)] Should a point be added for each observation? The points are colored by regime stability (default: FALSE).
logical(1)
FALSE
Ignored.
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" ) plot(regimes)
Run the code above in your browser using DataLab