Description Usage Arguments Details Value Author(s) See Also Examples
Functions to convert between cumulative and incremental triangles
1 2 |
Triangle |
triangle. Assume columns are the development period, use transpose otherwise. |
na.rm |
logical. Should missing values be removed? |
incr2cum
transforms an incremental triangle into a cumulative
triangle, cum2incr
provides the reserve operation.
Both functions return a triangle
.
Markus Gesmann, Christophe Dutang
See also as.triangle
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | # See the Taylor/Ashe example in Mack's 1993 paper
#original triangle
GenIns
#incremental triangle
cum2incr(GenIns)
#original triangle
incr2cum(cum2incr(GenIns))
# See the example in Mack's 1999 paper
#original triangle
Mortgage
incMortgage <- cum2incr(Mortgage)
#add missing values
incMortgage[1,1] <- NA
incMortgage[2,1] <- NA
incMortgage[1,2] <- NA
#with missing values argument
incr2cum(incMortgage, na.rm=TRUE)
#compared to
incr2cum(Mortgage)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.