Functions to convert between cumulative and incremental triangles
incr2cum(Triangle, na.rm=FALSE)cum2incr(Triangle)
Arguments
Triangle: triangle. Assume columns are the development period, use transpose otherwise.
na.rm: logical. Should missing values be removed?
Details
incr2cum transforms an incremental triangle into a cumulative triangle, cum2incr provides the reserve operation.
Returns
Both functions return a triangle.
Author(s)
Markus Gesmann, Christophe Dutang
See Also
See also as.triangle
Examples
# See the Taylor/Ashe example in Mack's 1993 paper#original triangleGenIns
#incremental trianglecum2incr(GenIns)#original triangleincr2cum(cum2incr(GenIns))# See the example in Mack's 1999 paper#original triangleMortgage
incMortgage <- cum2incr(Mortgage)#add missing valuesincMortgage[1,1]<-NAincMortgage[2,1]<-NAincMortgage[1,2]<-NA#with missing values argumentincr2cum(incMortgage, na.rm=TRUE)#compared to incr2cum(Mortgage)