Create matrix of future mortality probabilities
generate_annuity_probabilities.Rd
Creates a matrix with one row per annuitiy and mortality probabilities in columns.
Arguments
- annuities
dataframe, see description of
pool_of_annuities
in details ofprepare_data()
.- mortality
dataframe, see description of mortality_xmpl.
- age_shift
dataframe, see description of age_shift_xmpl.
Value
dataframe with one row per row in 'annuities' and 130 columns for future mortality probabilities.
Details
In order to reduce computing time when rolling out annuities, they are split into two matrices, one with agreed
future payments and one with the corresponding survival probabilities. This is the function for the latter.
The function uses the biometric entries of the dataframe annuities
to
create the matrix of the corresponding probabilities.
The first column is always 0 due to the assumption that annuities are paid in advance at the start of the year.
Examples
# this example uses data provided with this package
print(minimal_active_annuities_xmpl)
#> Claim_id Annuity_id Origin_year Calendar_year Entering_year Annuity_start
#> 1 Claim#43 1 2006 2023 2009 2009
#> 2 Claim#51 1 2010 2023 2013 2036
#> 3 Claim#13 1 1990 2023 1992 1992
#> Annuity_end Birth_year Gender Annual_payment Dynamic
#> 1 0 1939 m 12168.21 0
#> 2 2051 1986 m 12893.00 0
#> 3 0 1958 w 11807.36 0
# show only the first 10 columns
generate_annuity_probabilities(annuities = minimal_active_annuities_xmpl,
mortality = mortality_xmpl,
age_shift = age_shift_xmpl)[,1:10]
#> [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8]
#> [1,] 0 0.2868083 0.4937320 0.6423048 0.7484672 0.8239585 0.8773790 0.9149971
#> [2,] 0 0.1136917 0.2174082 0.3115931 0.3967347 0.4733544 0.5419961 0.6032160
#> [3,] 0 0.1839400 0.3364235 0.4623482 0.5659430 0.6508416 0.7201519 0.7765189
#> [,9] [,10]
#> [1,] 0.9413576 0.9597385
#> [2,] 0.6575737 0.7056247
#> [3,] 0.8221835 0.8590354