testr_MackChainLadder: Back-test MackChainLadder method

Description Usage Arguments Value Examples

View source: R/testr-functions.R

Description

Back-test MackChainLadder method

Usage

1
2
3
4
5
6
7
testr_MackChainLadder(
  train_data,
  test_data,
  loss_type = c("paid", "case", "ultimate"),
  .progress = NULL,
  ...
)

Arguments

train_data

a triangle object containing upper left of a loss triangle. Used as input to ChainLadder::MackChainLadder().

test_data

a triangle object containing the lower right portion of loss triangle. Used to test model estimates.

loss_type

a character indicating whether to use paid, case-incurred, or ultimate loss triangle

.progress

a Progress object used to display a text based progress bar. Default is NULL.

...

additional arguments passed on to ChainLadder::MackChainLadder()

Value

a tibble containing the true reserve, estimated mean, estimated coefficient of variation, and the implied percentile of the actual outcome

Examples

1
2
3
4
5
6
7
8
train_data <- cas_loss_reserve_db %>%
 get_meyers_subset() %>%
 purrr::pluck("train_tri_set", 8)
test_data <- cas_loss_reserve_db %>%
 get_meyers_subset() %>%
 purrr::pluck("test_tri_set", 8)

testr_mack <- testr_MackChainLadder(train_data, test_data, loss_type = "paid")

problemofpoints/reservetestr documentation built on Jan. 3, 2020, 9:12 a.m.