Skip to contents

uses a claims development pattern to calculate the lower right triangle of a matrix

Usage

fill_up_triangle(triangle, pattern = NULL)

Arguments

triangle

cumulative claims triangle. An (mxn)-matrix where only the upper left triangle (including diagonal) will be used

pattern

Default: NULL, numeric vector or NULL if no external pattern shall be used The pattern vector may be longer than the triangle for applying a tail pattern.

Value

filled triangle. numeric matrix

Examples

fill_up_triangle(matrix(c(1000, 800, 1200, 1200, 900, 1200, 1300, 900, 1200), 3))
#>         1    2        3
#> [1,] 1000 1200 1300.000
#> [2,]  800  900  975.000
#> [3,] 1200 1400 1516.667
fill_up_triangle(matrix(c(1000, 800, 1200, 1200, 900, 1200, 1300, 900, 1200), 3),
                        c(1.2, 1.1, 1.05, 1.01))
#>         1    2    3      4        5
#> [1,] 1000 1200 1300 1365.0 1378.650
#> [2,]  800  900  990 1039.5 1049.895
#> [3,] 1200 1440 1584 1663.2 1679.832