Skip to contents

Age-to-age ratios of the cumulative values. Development position k holds the ratio from age k to age k + 1, observed only where both ages are observed and the earlier value is non-zero.

Usage

link_ratios(x)

Arguments

x

A triangle.

Value

A triangle with one development position fewer, marked as not cumulative.

Examples

long <- data.frame(year = c(2020, 2020, 2021), age = c(12, 24, 12), paid = c(100, 150, 110))
link_ratios(triangle(long, "year", "age", "paid"))@values[1, 1, , ]
#> 2020 2021 
#>  1.5   NA