Construct exposure-driven incremental development data from an object
of class "Triangle", typically produced by build_triangle(). This is the
foundational data structure for the exposure-driven (ED) model,
where incremental loss is modelled as a function of cumulative
exposure (risk premium) rather than cumulative loss.
The incremental loss intensity is defined as:
$$g_{i,k} = \frac{\Delta C^L_{i,k+1}}{C^P_{i,k}}$$
where \(\Delta C^L_{i,k+1} = C^L_{i,k+1} - C^L_{i,k}\) is the incremental loss and \(C^P_{i,k}\) is the cumulative exposure (risk premium) at development period \(k\).
Usage
build_ed(
x,
loss_var = "closs",
exposure_var = "crp",
min_exposure = 0,
drop_invalid = FALSE
)Arguments
- x
An object of class
"Triangle".- loss_var
A single cumulative loss variable. Default is
"closs".- exposure_var
A single cumulative exposure variable. Default is
"crp".- min_exposure
Minimum exposure required to compute
g. Ifexposure_from <= min_exposure,gis set toNA. Default is0.- drop_invalid
Logical; if
TRUE, rows with invalid (non-finite)gvalues are dropped. Default isFALSE.
Value
A data.table with class "ED" containing:
ata_fromCurrent development period.
ata_toNext development period.
ata_linkConcatenated label
"ata_from-ata_to".loss_fromCumulative loss \(C^L_{i,k}\).
loss_toCumulative loss \(C^L_{i,k+1}\).
delta_lossIncremental loss \(\Delta C^L_{i,k+1}\).
exposure_fromCumulative exposure \(C^P_{i,k}\).
exposure_toCumulative exposure \(C^P_{i,k+1}\).
gIncremental loss intensity \(\Delta C^L_{i,k+1} / C^P_{i,k}\), or
NAwhenexposure_from <= min_exposure.
The returned object carries the following attributes:
group_var, cohort_var, dev_var, loss_var, and
exposure_var.
Examples
if (FALSE) { # \dontrun{
d <- build_triangle(df, group_var = cv_nm)
ed <- build_ed(d)
head(ed)
attr(ed, "loss_var")
attr(ed, "exposure_var")
} # }
