Learn R Programming

RegimeChange (version 0.1.1)

economic_cycles: Economic Cycles Dataset

Description

A simulated time series representing an economic indicator with regime changes corresponding to expansion, recession, recovery, and stable growth periods.

Usage

economic_cycles

Arguments

Format

A time series object of length 500 with attributes:

true_changepoints

Vector of true changepoint locations: c(120, 250, 380)

description

Description of the dataset

regimes

Names of the regimes: Expansion, Recession, Recovery, Stable Growth

Details

The data simulates monthly economic data from 2000-2041 with four distinct regimes:

  • Regime 1 (1-120): Expansion - positive trend, low volatility

  • Regime 2 (121-250): Recession - negative trend, high volatility

  • Regime 3 (251-380): Recovery - positive trend, medium volatility

  • Regime 4 (381-500): Stable Growth - low trend, low volatility

Examples

Run this code
# \donttest{
data(economic_cycles)
result <- detect_regimes(economic_cycles, method = "pelt")
plot(result)

# Compare with true changepoints
true_cps <- attr(economic_cycles, "true_changepoints")
evaluate(result, true_changepoints = true_cps)
# }

Run the code above in your browser using DataLab