Skip to contents

Tables of a chain_ladder_fit, mack_fit, expected_loss_fit, cape_cod_fit, odp_bootstrap_fit, mack_bootstrap_fit, bayes_odp_fit, bayes_odp_fits, bayes_bf_fit, bayes_bf_normalised_fit, meyers_fit, meyers_fits, one_year_fit, bayes_one_year_fit, bayes_one_year_fits, clark_fit or compartmental_fit, compartmental_fits, compartmental_one_year_fit or compartmental_one_year_fits with the triangle's key columns by name. as.data.frame(fit) has one row per segment and origin: origin, latest, ultimate and reserve (the method's own), plus for Mack process_risk, parameter_risk and standard_error, for the expected-loss methods exposure and apriori (and Cape Cod's trended_apriori), for the bootstraps the mean and std_dev of the bootstrapped reserve (for bayes_odp(), bayes_odp_segments(), bayes_bf(), bayes_bf_normalised(), meyers() and meyers_segments() of the posterior predictive reserve; bayes_bf() and bayes_bf_normalised() add the exposure and prior_ultimate and the ultimate_mean, latest plus mean, meyers() and meyers_segments() add the premium and the ultimate_mean and ultimate_std_dev of the predictive ultimate, and all four end with ulr_mean, the ultimate_mean over the exposure), and for Clark (Cape Cod) exposure, expected_ultimate and the three standard errors; for compartmental() the premium, latest_paid, the mean and std_dev of the posterior predictive reserve and the ultimate_loss_ratio. The one-year view (and bayes_odp_one_year()'s) names them opening_ultimate and opening_reserve and adds the cdr_mean and cdr_std_dev of the claims development result. A method with an exposure (the expected-loss methods, Clark's Cape Cod, bayes_bf(), bayes_bf_normalised(), meyers() and meyers_segments(), whose exposure is the premium) ends its own columns with ulr, the table's ultimate over the exposure (for the Bayesian fits the chain ladder's ultimate), a loss ratio only when the exposure is premium; the Bayesian one-year views have opening_ulr instead, the opening ultimate (the latest value plus the posterior mean opening reserve) over the exposure, and totals_frame() has the total ultimate over the total exposure. totals_frame() has one row per segment with the same quantities for the segment's total (for the expected-loss methods the total exposure, for the ODP bootstrap, its one-year view, bayes_odp(), bayes_odp_segments(), bayes_bf() and bayes_bf_normalised() also the scale, for bayes_odp_one_year() the scale and flagged_share; for Clark its omega, theta, scale and, for Cape Cod, elr). development_frame() has one row per segment and age: development, ldf (to the next age), cdf (to ultimate, with the tail), sigma and std_err; the oldest age has NA for ldf, sigma and std_err. A clark_fit has no development table of its own: use development_frame(fit@chain_ladder) for the chain ladder's. A munich_fit's three tables have its own columns, paid and incurred side by side (see munich_fit).

Usage

totals_frame(fit)

development_frame(fit)

segment(fit, ...)

Value

A data.frame, or for segment() a fit of the same class.

Details

segment() returns the fit of one segment, chosen by key values as in segment(fit, lob = "auto") (compared as character). Keys not named may take any value, so a fit with one segment needs none; a choice that matches several segments is an error. For the bootstraps, the segment keeps its part of the joint reserves (and meyers_fits of the joint ultimates), and for the one-year view its part of the joint cdr, with the same dimensions. On a latest_valuation, segment() returns the latest valuation of one segment.

These are Python's to_frame(), totals_frame(), development_frame() and segment(**keys).

Examples

long <- data.frame(lob = rep(c("auto", "home"), each = 6), year = c(2020, 2020, 2020, 2021, 2021, 2022),
                   age = c(12, 24, 36, 12, 24, 12),
                   paid = c(100, 150, 165, 110, 170, 120, 50, 80, 85, 60, 90, 70))
fits <- chain_ladder(triangle(long, "year", "age", "paid", keys = "lob"))
totals_frame(fits)
#>    lob latest ultimate  reserve tail tail_sigma tail_std_err
#> 1 auto    455 553.1429 98.14286    1          0            0
#> 2 home    245 295.5682 50.56818    1          0            0
development_frame(fits)
#>    lob development      ldf      cdf     sigma    std_err
#> 1 auto          12 1.523810 1.676190 0.3289758 0.02270149
#> 2 auto          24 1.100000 1.100000        NA         NA
#> 3 auto          36       NA 1.000000        NA         NA
#> 4 home          12 1.545455 1.642045 0.5222330 0.04979296
#> 5 home          24 1.062500 1.062500        NA         NA
#> 6 home          36       NA 1.000000        NA         NA
segment(fits, lob = "home")@ldf
#>    12-24    24-36 
#> 1.545455 1.062500