Calculate the biggest single annual loss for each scenario, as well as the minimum and maximum ALE across all iterations. Calculations both with and without outliers (if passed) are returned.
calculate_max_losses(simulation_results, scenario_outliers = NULL)
Simulation results dataframe.
Optional vector of IDs of outlier scenarios.
A dataframe with the following columns:
iteration
- index of the iteration
biggest_single_scenario_loss
- the biggest annual loss in that iteration,
min_loss
- the smallest annual loss in that iteration,
max_loss
- the total annual losses in that iteration
outliers
- logical of whether or not outliers are included
data(mc_simulation_results)
calculate_max_losses(mc_simulation_results)
#> # A tibble: 1,000 × 5
#> iteration biggest_single_scenario_loss min_loss max_loss outliers
#> <int> <dbl> <dbl> <dbl> <lgl>
#> 1 1 2987483. 0 13247898. FALSE
#> 2 2 3159502. 0 13571376. FALSE
#> 3 3 2937112. 0 14084157. FALSE
#> 4 4 2142845. 0 9469525. FALSE
#> 5 5 2610111. 0 10066804. FALSE
#> 6 6 4000900. 0 16928496. FALSE
#> 7 7 3812536. 0 18283797. FALSE
#> 8 8 3705607. 0 16948823. FALSE
#> 9 9 3888987. 0 20748512. FALSE
#> 10 10 2440504. 0 10966272. FALSE
#> # … with 990 more rows