LDTr

Introduction

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:

Installation

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.

Getting Started

After installing the package, load "LDTr". The "LDTr" package depends on both the "dplyr" and "tidyr" packages.

library(LDTr)

Sample Dataset

Run off triangle of incremental claims data in the traditional data format.

data(RAA,package="LDTr")
head(RAA, n = 20)

tbl_tri()

Transform the dataset to a triangle while maintaining the current structure of the data.

RAA %>% tbl_tri(type = "Incremental")

transform()

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")


m-montero/LDTr documentation built on May 21, 2019, 9:17 a.m.