Skip to contents

Mack's (1994, appendix H) test for calendar-year effects, as R ChainLadder's cyEffTest(): at each age the link ratios are split at their median into small and large ones (one equal to the median is in neither); each calendar diagonal counts its small ones S_j and large ones L_j, and Z = sum(min(S_j, L_j)) is compared with the normal interval E[Z] +- q sqrt(Var[Z]), q = qnorm((1 + ci) / 2). A diagonal where small (or large) factors prevail lowers Z.

Usage

calendar_year_test(ptr)

calendar_year_effect(x, column = NULL, ci = 0.95)

Arguments

ptr

A CalendarYearTest pointer; used internally.

x

A triangle or a single-segment mack_fit.

column

The column to test, for a triangle with several columns. Not used for a fit.

ci

The interval's confidence level, strictly between 0 and 1; Mack's and R's 95% by default.

Value

A calendar_year_test object.

Details

On a triangle the test reads every observed link ratio of column. On a single-segment mack_fit it reads the link ratios the fit averaged: its column's, without those n_periods, drop_high and drop_low exclude; a selected pattern (ldf) changes no link ratio and so not the test (docs/design/reserving-v02.md, decision 27).

Properties: z, expected, variance, ci, range (lower and upper), passes (TRUE when z lies within the range, ends included: no calendar-year effect is detected; R's print says the opposite, "Calendar Year Effect: FALSE") and test_table, one row per calendar diagonal with at least two link ratios, oldest first: valuation (the year and month of its later cells), S_j, L_j, Z_j, n, m, E_Zj and Var_Zj, as R's test_table (R's j is the diagonal's number). summary() gives R's list of Table, Totals and Range.

See also

development_correlation() for the other assumption test.

Examples

long <- data.frame(year = rep(2016:2021, 6:1),
                   age = sequence(6:1) * 12,
                   paid = c(100, 160, 180, 186, 188, 189, 110, 170, 195, 200, 202,
                            120, 200, 220, 224, 130, 205, 225, 140, 215, 150))
tri <- triangle(long, "year", "age", "paid")
cy <- calendar_year_effect(tri)
cy
#> <calendar_year_test> Mack's calendar-year effect test
#> Z = 2, E[Z] = 3, Var[Z] = 1.125
#> 95%-range = (0.9211442635; 5.078855737)
#> Calendar year effect: not detected
cy@passes
#> [1] TRUE
summary(cy)
#> $Table
#>   valuation S_j L_j Z_j n m E_Zj Var_Zj
#> 1   2018-12   1   1   1 2 0 0.50 0.2500
#> 2   2019-12   0   3   0 3 1 0.75 0.1875
#> 3   2020-12   1   1   1 2 0 0.50 0.2500
#> 4   2021-12   4   0   0 4 1 1.25 0.4375
#> 
#> $Totals
#>        Totals
#> Z       2.000
#> E[Z]    3.000
#> Var[Z]  1.125
#> 
#> $Range
#>           Value
#> Lower 0.9211443
#> Upper 5.0788557
#> 
# The same test on the link ratios a Mack fit averaged.
calendar_year_effect(mack(tri))@z
#> [1] 2