Skip to contents

This function generate two plots that compare best estimates with claim reserves on a single claim basis, one plot for claims that have not yet reached the tail (pretail) and one for claims during the tail.

Usage

plot_reserve_vs_be_per_claim(
  last_orig_year,
  pools,
  large_claims_list,
  indices,
  age_shift = NULL,
  mortality = NULL,
  n = 100
)

Arguments

last_orig_year

Last origin year.

pools

List as output of generate_pools().

large_claims_list

Dataframe with one row per known large claim generated by generate_claims_list().

indices

Dataframe for indexation, see details of prepare_data().

age_shift

Dataframe, see description of age_shift_xmpl. Default: NULL
Only necessary if annuities shall be considered.

mortality

Dataframe, see description of mortality_xmpl. Default: NULL
Only necessary if annuities shall be considered.

n

Number of simulations. Default: 100

Value

List of two ggplot elements, first for pretail claims and second for tail claims.

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)

p <- plot_reserve_vs_be_per_claim(
   last_orig_year = 2023,
   pools = pools,
   large_claims_list = large_claims_list,
   indices = indices_xmpl,
   age_shift = age_shift_xmpl,
   mortality = mortality_xmpl)