Select ultimates by weighting methods
select_ultimates.RdThe selected ultimate per origin, a weighting of several methods'
ultimates, with its IBNR and unpaid: Friedland's selected ultimate claims
(chapter 15, Exhibit I, sheet 2, column (11)) and chainladder-python's
VotingChainladder (Rust's UltimateExhibit::select,
docs/design/reserving-v02.md, decision 34).
Usage
select_ultimates(
x,
weights = NULL,
by_age = NULL,
triangle = NULL,
reported = NULL,
paid = NULL,
total = TRUE
)Arguments
- x
An
ultimate_exhibit(), or a named list of fits, withtriangleandreportedorpaidfor the claims to date.- weights
A method name (that method alone), or a named list or named numeric vector of method name to one weight for every origin or a weight per origin.
- by_age
Instead of
weights, a data frame with a columnage(in months) and one column per method: each origin takes the row of the oldest age not past its own; an origin younger than every age is an error.- triangle, reported, paid
With a list of fits, the triangle and its reported and paid columns, as in
ultimate_exhibit().- total
Whether to end the table with a
"total"row (the weightsNAthere).
Value
A data frame, one row per origin (and the total): origin,
age, reported and paid when given, ultimate, ibnr and
unpaid when defined, and each method's weight as weight_<method>.
Details
Each origin's weights must be at least 0 and sum to 1 (within 1e-9);
they are not rescaled, unlike VotingChainladder, which divides by
their sum. A method left out has weight 0, and a method with weight 0
may have no ultimate (NA) there; a positive weight on a missing
ultimate is an error.
Examples
long <- data.frame(year = c(2020, 2020, 2021), age = c(12, 24, 12),
reported = c(100, 150, 120), paid = c(60, 140, 50))
tri <- triangle(long, "year", "age", c("reported", "paid"))
fits <- list(reported = chain_ladder(tri, "reported"), paid = chain_ladder(tri, "paid"))
select_ultimates(fits, list(reported = c(1, 0.5), paid = c(0, 0.5)),
triangle = tri, reported = "reported", paid = "paid")
#> origin age reported paid ultimate ibnr unpaid weight_reported
#> 1 2020 24 150 140 150.0000 0.00000 10.00000 1.0
#> 2 2021 12 120 50 148.3333 28.33333 98.33333 0.5
#> 3 total NA 270 190 298.3333 28.33333 108.33333 NA
#> weight_paid
#> 1 0.0
#> 2 0.5
#> 3 NA
# Weights by age: the paid method alone from 24 months.
ex <- ultimate_exhibit(tri, reported = "reported", paid = "paid", methods = fits)
select_ultimates(ex, by_age = data.frame(age = c(12, 24), reported = c(1, 0),
paid = c(0, 1)))
#> origin age reported paid ultimate ibnr unpaid weight_reported weight_paid
#> 1 2020 24 150 140 140 -10 0 0 1
#> 2 2021 12 120 50 180 60 130 1 0
#> 3 total NA 270 190 320 50 130 NA NA