triangle {apc}R Documentation

Triangular matrices used in reserving

Description

Triangular matrices are used for reserving in general insurance. A matrix is triangular if it is square and it has NAs in lower triangle where row+col>dim. The apc package uses incremental triangles.

The function is.triangle tests if an object is a triangular matrix.

The function triangle.cumulative forms the cumulative version of an incremental matrix by taking partial sums in each row.

The function triangle.incremental forms the incremental version of an cumulative matrix by taking differences in each row.

The function vector.2.triangle turns a k*(k+1)/2 vector into a triangular matrix of dimension k.

Usage

is.triangle(m)
triangle.cumulative(m)
triangle.incremental(m)
vector.2.triangle(v,k)

Arguments

v

vector. Length k*(k+1)/2

k

integer. Dimension

m

matrix. Square matrix

Author(s)

Bent Nielsen <bent.nielsen@nuffield.ox.ac.uk> 21 Nov 2019 (7 Feb 2015)

Examples

#########################

m <- vector.2.triangle(1:10,4)
m
is.triangle(m)
triangle.cumulative(m)
triangle.incremental(m)

[Package apc version 2.0.0 Index]