Description Usage Arguments Author(s) Examples
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.
1 2 3 4 | is.triangle(m)
triangle.cumulative(m)
triangle.incremental(m)
vector.2.triangle(v,k)
|
v |
vector. Length k*(k+1)/2 |
k |
integer. Dimension |
m |
matrix. Square matrix |
Bent Nielsen <bent.nielsen@nuffield.ox.ac.uk> 21 Nov 2019 (7 Feb 2015)
1 2 3 4 5 6 7 | #########################
m <- vector.2.triangle(1:10,4)
m
is.triangle(m)
triangle.cumulative(m)
triangle.incremental(m)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.