Given a dataframe of raw results from run_simulations, summarize the individual results at a per-iteration level.

summarize_iterations(simulation_result, ..., .key = "iteration")

Arguments

simulation_result

Results object for a single scenario.

...

Additional simulation result objects to summarize.

.key

Iteration ID field

Value

Dataframe.

Details

Summary stats created include: * Mean/Min/Max/Median are calculated for loss events * Median/Max/VaR are calculated for annual loss expected (ALE) * Mean/Median/Max/Min are calculated for single loss expected (SLE) * Mean percentage of threat capability exceeding difficulty on successful threat events * Mean percentage of difficulty exceeding threat capability on defended events * Vulnerability percentage * Z-score of ALE (outliers flagged as 2 >= z-score)

Examples

data(mc_simulation_results) summarize_iterations(mc_simulation_results$results)
#> # A tibble: 1,000 × 11 #> iteration largest_single_scenario_loss min_loss max_loss outliers ale_sum #> <int> <dbl> <dbl> <dbl> <lgl> <dbl> #> 1 1 2987483. 0 13247898. TRUE 13247898. #> 2 2 3159502. 0 13571376. TRUE 13571376. #> 3 3 2937112. 0 14084157. TRUE 14084157. #> 4 4 2142845. 0 9469525. TRUE 9469525. #> 5 5 2610111. 0 10066804. TRUE 10066804. #> 6 6 4000900. 0 16928496. TRUE 16928496. #> 7 7 3812536. 0 18283797. TRUE 18283797. #> 8 8 3705607. 0 16948823. TRUE 16948823. #> 9 9 3888987. 0 20748512. TRUE 20748512. #> 10 10 2440504. 0 10966272. TRUE 10966272. #> # … with 990 more rows, and 5 more variables: mean_tc_exceedance <dbl>, #> # mean_diff_exceedance <dbl>, loss_events <int>, threat_events <int>, #> # avoided_events <int>