| awaken | R Documentation |
Simulates what would happen if a dormant pattern were to "awaken" - i.e., become active. This function allows exploration of potential future states and scenario analysis without waiting for actual pattern activation.
awaken(
dormancy_result,
pattern_id = 1,
intensity = 1,
n_sim = 100,
return_data = FALSE,
verbose = FALSE
)
dormancy_result |
An object of class "dormancy" from |
pattern_id |
Integer or "all". Which pattern(s) to awaken. Default is 1. |
intensity |
Numeric. Intensity of awakening, from 0 (dormant) to 1 (fully active). Default is 1. |
n_sim |
Integer. Number of simulation runs. Default is 100. |
return_data |
Logical. Whether to return simulated data. Default is FALSE. |
verbose |
Logical. Whether to print progress messages. Default is FALSE. |
Awakening simulation is valuable for:
Scenario planning and stress testing
Understanding potential system behaviors
Preparing for pattern activation events
Testing the robustness of current strategies
The simulation works by:
Identifying the dormant pattern's trigger conditions
Simulating data where those conditions are met
Applying the pattern's relationship to the simulated data
Measuring the resulting effects on the system
A list containing:
awakening_effects - Data frame describing the effects of awakening
simulated_stats - Summary statistics from simulations
cascade_effects - Effects on other patterns (if any)
simulated_data - If return_data = TRUE, simulated datasets
set.seed(42)
n <- 500
x <- rnorm(n)
z <- sample(c(0, 1), n, replace = TRUE)
y <- ifelse(z == 1, 0.8 * x + rnorm(sum(z), 0, 0.3), rnorm(n))
data <- data.frame(x = x, y = y, z = factor(z))
result <- dormancy_detect(data, method = "conditional")
awakening <- awaken(result, pattern_id = 1, n_sim = 50)
print(awakening)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.