R/openfair.R
openfair_tef_tc_diff_lm.Rd
Run an OpenFAIR model with parameters provided for TEF, TC, DIFF, and LM sampling. If there are multiple controls provided for the scenario, the arithmetic mean (average) is taken across samples for all controls to get the effective control strength for each threat event.
openfair_tef_tc_diff_lm(tef, tc, diff, lm, n = 10^4, verbose = FALSE)
Parameters for TEF simulation
Parameters for TC simulation
Parameters for DIFF simulation
Parameters for LM simulation
Number of iterations to run.
Whether to print progress indicators.
Dataframe of scenario name, threat_event count, loss_event count, mean TC and DIFF exceedance, and ALE samples.
Other OpenFAIR helpers:
compare_tef_vuln()
,
get_mean_control_strength()
,
sample_diff()
,
sample_lef()
,
sample_lm()
,
sample_tc()
,
sample_vuln()
,
select_loss_opportunities()
data(mc_quantitative_scenarios)
params <- mc_quantitative_scenarios$scenario[[1]]$parameters
openfair_tef_tc_diff_lm(params$tef, params$tc, params$diff, params$lm, 10)
#> # A tibble: 10 × 11
#> iteration threat_events loss_events vuln mean_tc_exceedance mean_diff_excee…
#> <int> <int> <int> <dbl> <dbl> <dbl>
#> 1 1 30 5 0.167 0.0463 0.0690
#> 2 2 30 11 0.367 0.0323 0.0723
#> 3 3 23 7 0.304 0.0249 0.0842
#> 4 4 19 11 0.579 0.0330 0.0604
#> 5 5 24 4 0.167 0.0281 0.0759
#> 6 6 36 14 0.389 0.0255 0.0633
#> 7 7 32 7 0.219 0.0405 0.0580
#> 8 8 31 8 0.258 0.0210 0.0711
#> 9 9 41 11 0.268 0.0299 0.0660
#> 10 10 20 4 0.2 0.0459 0.0855
#> # … with 5 more variables: ale <dbl>, sle_mean <dbl>, sle_median <dbl>,
#> # sle_max <dbl>, sle_min <dbl>