Summarize Simulation Outputs with Medians and Confidence Intervals
Source:R/model_simulation.R
summarize_simulations.Rd
Computes the pointwise median and confidence intervals for selected variables across multiple simulation runs. Useful for summarizing posterior predictive distributions of model outputs.
Arguments
- simulation_results
A list of data frames, where each data frame contains the model output for a different parameter set. Each data frame must include a
date_ymd
column.- ci_level
Numeric value between 0 and 1 specifying the confidence level for the intervals (e.g.,
0.95
for 95% confidence intervals).- variables
A character vector indicating which compartment names to summarize (e.g.,
c("SC", "EC", "prev_total_with_R")
). IfNULL
, all variables exceptdate_ymd
andsimulation_id
will be included.