Construct age-to-age development factors from an object of class Triangle,
typically produced by build_triangle(). Age-to-age factors are calculated
from cumulative values such as closs or crp.
Age-to-age is defined as: $$ata_{k \to k+1} = value_{k+1} / value_k$$
where value_k is the selected cumulative metric at development period k.
Arguments
- x
An object of class
Triangle.- value_var
A single cumulative metric used to compute age-to-age. Must be one of
"closs","crp", or"clr".- weight_var
An optional single cumulative metric used as weights in WLS estimation via
summary.ATA(). Must be one of"closs","crp", or"clr", and must differ fromvalue_var. Typical use isweight_var = "crp"whenvalue_var = "clr", sinceclrvalues are ratios and carry no exposure information. WhenNULL(default),value_fromis used as the WLS weight, which corresponds to the standard volume-weighted chain ladder.- min_denom
Minimum denominator required to compute age-to-age. If
value_from <= min_denom,atais set toNA. This is useful when early development periods contain structural zeros (for example, waiting periods in life insurance).- drop_invalid
Logical; if
TRUE, rows with invalid (non-finite) age-to-age factors are dropped. Useful for clean output when passing tosummary.ATA()orfind_ata_maturity(). WhenFALSE(default), all rows are retained, preserving the full triangle structure for diagnostic visualisation viaplot_triangle.ATA().
Value
A data.frame with class "ATA" containing:
ata_fromCurrent development period.
ata_toNext development period.
value_fromCurrent cumulative value.
value_toNext cumulative value.
ataAge-to-age factor (
value_to / value_from), orNAwhenvalue_from <= min_denom.weightWeight values at
ata_fromderived fromweight_var. Only present whenweight_varis supplied.
The returned object carries the following attributes:
group_var, cohort_var, dev_var, value_var, and
weight_var.
Examples
if (FALSE) { # \dontrun{
d <- build_triangle(df, group_var = cv_nm)
ata1 <- build_ata(d, "closs")
ata2 <- build_ata(d, "crp")
ata3 <- build_ata(d, "clr", weight_var = "crp")
head(ata1)
attr(ata1, "value_var")
attr(ata1, "weight_var")
} # }
