Calculate the biggest single annual loss for each scenario, as well as the minimum and maximum ALE across all simulations. Calculations both with and without outliers (if passed) are returned.

calculate_max_losses(simulation_results, scenario_outliers = NULL)

Arguments

simulation_results

Simulation results dataframe.

scenario_outliers

Optional vector of IDs of outlier scenarios.

Value

A dataframe with the following columns:

  • scenario_id - index of the simulation

  • biggest_single_scenario_loss - the biggest annual loss in that simulation,

  • min_loss - the smallest annual loss in that simulation,

  • max_loss - the total annual losses in that simulation

  • outliers - logical of whether or not outliers are included

Examples

data(simulation_results) calculate_max_losses(simulation_results)
#> # A tibble: 1,000 x 5 #> simulation biggest_single_scenario_loss min_loss max_loss outliers #> <int> <dbl> <dbl> <dbl> <lgl> #> 1 1 2721058. 0 12622839. FALSE #> 2 2 3137768. 0 14208481. FALSE #> 3 3 2937112. 0 13776227. FALSE #> 4 4 2142845. 0 9286817. FALSE #> 5 5 2610111. 0 10158854. FALSE #> 6 6 3734973. 0 17223784. FALSE #> 7 7 3812536. 0 18182688. FALSE #> 8 8 3705607. 0 16542508. FALSE #> 9 9 3888987. 0 19204050. FALSE #> 10 10 2440504. 0 11499125. FALSE #> # ... with 990 more rows