A loss development triangle (LDT) is a table that shows changes in the values of a set of claims over time.
As an Actuary, utilizing loss development triangles is one of the first steps for an actuarial analysis. However, for efficiency reasons, the structure of the data is not stored in a triangular format which adds an additional layer of complexity.
The LDTr package is designed to simplify the use of this data structure by providing the following features:
The development version can be installed using:
# install.packages("devtools") devtools::install_github("m-montero/LDTr")
Warning: This package is not at a stable state and is subject to major updates. Please use with caution.
After installing the package, load "LDTr". The "LDTr" package depends on both the "dplyr" and "tidyr" packages.
library(LDTr)
Run off triangle of incremental claims data in the traditional data format.
data(RAA,package="LDTr") head(RAA, n = 20)
Transform the dataset to a triangle while maintaining the current structure of the data.
RAA %>% tbl_tri(type = "Incremental")
Transform the dataset from an "Incremental" triangle to a "Cumulative" triangle.
RAA %>% tbl_tri(type = "Incremental") %>% transform(type = "Cumulative")
Transform the dataset from an "Incremental" triangle to a "Development" triangle.
RAA %>% tbl_tri(type = "Incremental") %>% transform(type = "Development")
Transform the dataset from an "Incremental" triangle, to a "Cumulative" triangle, to finally a "Development" triangle.
RAA %>% tbl_tri(type = "Incremental") %>% transform(type = "Cumulative") %>% transform(type = "Development")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.