Generates plots to compare best estimates with reserves
plot_reserve_vs_be.RdThis function generates two plots that graphically compare the entry reserves with the calculated best estimates.
Arguments
- large_claims_list
Dataframe with one row per known large claim generated by
generate_claims_list().- sim_result
Numeric array as a result of
sicr().
Value
list of two ggplot2 objects, first compares per reserve class, second compares per development year
Examples
# this example uses data provided with this package
extended_claims_data <- prepare_data(claims_data = claims_data_xmpl,
indices = indices_xmpl,
threshold = 400000,
first_orig_year = 1989,
last_orig_year = 2023,
expected_year_of_growing_large = 3,
reserve_classes = c(1, 200001, 400001, 700001, 1400001),
pool_of_annuities = pool_of_annuities_xmpl)
pools <- generate_pools(extended_claims_data = extended_claims_data,
reserve_classes = c(1, 200001, 400001, 700001, 1400001),
years_for_pools = 2014:2023,
start_of_tail = 17,
end_of_tail = 50,
lower_outlier_limit = -Inf,
upper_outlier_limit = Inf,
pool_of_annuities = pool_of_annuities_xmpl)
large_claims_list <- generate_claims_list(extended_claims_data = extended_claims_data,
first_orig_year = 1989,
last_orig_year = 2023)
history <- generate_history_per_claim(data = extended_claims_data,
column = "Cl_payment_cal",
first_orig_year = 1989,
last_orig_year = 2023)
# smallest version
sim_result <- sicr(n = 1,
large_claims_list = large_claims_list,
first_orig_year = 1989,
last_orig_year = 2023,
pools = pools,
indices = indices_xmpl,
history = history)
#>
1 of 1 (100%) --- remaining time approx. Inf secs
#>
#> Simulation time: 0,40 secs
#>
#> Gross Best Estimate: 120.773.908,60 (standard error: -)
#> ...Known claims 95.848.308,10
#> ...IBNR 24.925.600,50
p <- plot_reserve_vs_be(
large_claims_list = large_claims_list,
sim_result = sim_result)