Skip to contents

This is a helper function for the function compute_special_claims(). It is designed for the purpose of rolling out a reserve of a special claim either by a given external pattern or linear or constant.

Usage

roll_out_single_claim(
  reserve,
  years = 1,
  type = "linear",
  external_pattern = NULL
)

Arguments

reserve

Numeric value of the reserve to be rolled out.

years

Integer value stating how many future years shall be considered. Default: 1
This parameter is not used if type is set to external.

type

Desired way of rolling out reserve. Must be one of linear, constant or external. Default: linear.
In case of linear or constant the parameter years will be used. external requires the parameter external_pattern.

external_pattern

Numeric vector with future payments as a percentage of reserve. Sum must be 1.

Value

Numeric vector of length 250 with future payments.

Examples

# Default type linear and years 1
roll_out_single_claim(1000)
#>   [1] 1000    0    0    0    0    0    0    0    0    0    0    0    0    0    0
#>  [16]    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
#>  [31]    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
#>  [46]    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
#>  [61]    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
#>  [76]    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
#>  [91]    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
#> [106]    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
#> [121]    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
#> [136]    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
#> [151]    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
#> [166]    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
#> [181]    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
#> [196]    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
#> [211]    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
#> [226]    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
#> [241]    0    0    0    0    0    0    0    0    0    0
roll_out_single_claim(1000, 5)
#>   [1] 333.33333 266.66667 200.00000 133.33333  66.66667   0.00000   0.00000
#>   [8]   0.00000   0.00000   0.00000   0.00000   0.00000   0.00000   0.00000
#>  [15]   0.00000   0.00000   0.00000   0.00000   0.00000   0.00000   0.00000
#>  [22]   0.00000   0.00000   0.00000   0.00000   0.00000   0.00000   0.00000
#>  [29]   0.00000   0.00000   0.00000   0.00000   0.00000   0.00000   0.00000
#>  [36]   0.00000   0.00000   0.00000   0.00000   0.00000   0.00000   0.00000
#>  [43]   0.00000   0.00000   0.00000   0.00000   0.00000   0.00000   0.00000
#>  [50]   0.00000   0.00000   0.00000   0.00000   0.00000   0.00000   0.00000
#>  [57]   0.00000   0.00000   0.00000   0.00000   0.00000   0.00000   0.00000
#>  [64]   0.00000   0.00000   0.00000   0.00000   0.00000   0.00000   0.00000
#>  [71]   0.00000   0.00000   0.00000   0.00000   0.00000   0.00000   0.00000
#>  [78]   0.00000   0.00000   0.00000   0.00000   0.00000   0.00000   0.00000
#>  [85]   0.00000   0.00000   0.00000   0.00000   0.00000   0.00000   0.00000
#>  [92]   0.00000   0.00000   0.00000   0.00000   0.00000   0.00000   0.00000
#>  [99]   0.00000   0.00000   0.00000   0.00000   0.00000   0.00000   0.00000
#> [106]   0.00000   0.00000   0.00000   0.00000   0.00000   0.00000   0.00000
#> [113]   0.00000   0.00000   0.00000   0.00000   0.00000   0.00000   0.00000
#> [120]   0.00000   0.00000   0.00000   0.00000   0.00000   0.00000   0.00000
#> [127]   0.00000   0.00000   0.00000   0.00000   0.00000   0.00000   0.00000
#> [134]   0.00000   0.00000   0.00000   0.00000   0.00000   0.00000   0.00000
#> [141]   0.00000   0.00000   0.00000   0.00000   0.00000   0.00000   0.00000
#> [148]   0.00000   0.00000   0.00000   0.00000   0.00000   0.00000   0.00000
#> [155]   0.00000   0.00000   0.00000   0.00000   0.00000   0.00000   0.00000
#> [162]   0.00000   0.00000   0.00000   0.00000   0.00000   0.00000   0.00000
#> [169]   0.00000   0.00000   0.00000   0.00000   0.00000   0.00000   0.00000
#> [176]   0.00000   0.00000   0.00000   0.00000   0.00000   0.00000   0.00000
#> [183]   0.00000   0.00000   0.00000   0.00000   0.00000   0.00000   0.00000
#> [190]   0.00000   0.00000   0.00000   0.00000   0.00000   0.00000   0.00000
#> [197]   0.00000   0.00000   0.00000   0.00000   0.00000   0.00000   0.00000
#> [204]   0.00000   0.00000   0.00000   0.00000   0.00000   0.00000   0.00000
#> [211]   0.00000   0.00000   0.00000   0.00000   0.00000   0.00000   0.00000
#> [218]   0.00000   0.00000   0.00000   0.00000   0.00000   0.00000   0.00000
#> [225]   0.00000   0.00000   0.00000   0.00000   0.00000   0.00000   0.00000
#> [232]   0.00000   0.00000   0.00000   0.00000   0.00000   0.00000   0.00000
#> [239]   0.00000   0.00000   0.00000   0.00000   0.00000   0.00000   0.00000
#> [246]   0.00000   0.00000   0.00000   0.00000   0.00000

# constant
roll_out_single_claim(1000, 5, "constant")
#>   [1] 200 200 200 200 200   0   0   0   0   0   0   0   0   0   0   0   0   0
#>  [19]   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0
#>  [37]   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0
#>  [55]   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0
#>  [73]   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0
#>  [91]   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0
#> [109]   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0
#> [127]   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0
#> [145]   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0
#> [163]   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0
#> [181]   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0
#> [199]   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0
#> [217]   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0
#> [235]   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0

# external_pattern
roll_out_single_claim(1000, type = "external", external_pattern = c(0.3, 0.5, 0.1, 0.1, 0, 0))
#>   [1] 300 500 100 100   0   0   0   0   0   0   0   0   0   0   0   0   0   0
#>  [19]   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0
#>  [37]   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0
#>  [55]   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0
#>  [73]   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0
#>  [91]   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0
#> [109]   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0
#> [127]   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0
#> [145]   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0
#> [163]   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0
#> [181]   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0
#> [199]   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0
#> [217]   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0
#> [235]   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0