setUpperTriangle-methods: Set up the upper triangle based on claim data.

setUpperTriangleR Documentation

Set up the upper triangle based on claim data.

Description

setUpperTriangle sets up the upper triangle based on a data file.

Usage

setUpperTriangle(object, data, ...)

## S4 method for signature 'Triangle,data.frame'
setUpperTriangle(
  object,
  data,
  evaluationDate = as.Date("2016-12-31"),
  lob = "Total",
  ctype = "Total"
)

Arguments

object

Triangle Object

data

Claim Data

...

Additional function arguments.

evaluationDate

Evaluation Date;

lob

Line of Business;

ctype

Claim Type.

Examples

library(cascsim)
data(claimdata)
xTri <- new("Triangle", triID = "TRI1", type = "reportedCount", startDate=as.Date("2012-01-01"),
frequency="yearly", sim=1, percentile=50)
xTri<-setUpperTriangle(xTri,claimdata)
xTri@upper

xTri <- new("Triangle", triID = "TRI1", type = "closedCount", startDate=as.Date("2012-01-01"),
frequency="quarterly", sim=1, percentile=50)
xTri<-setUpperTriangle(xTri,claimdata)
xTri@upper

xTri <- new("Triangle", triID = "TRI1", type = "incurredLoss", startDate=as.Date("2012-01-01"),
frequency="yearly", sim=1, percentile=50)
xTri<-setUpperTriangle(xTri,claimdata,lob="Auto",ctype="H")
xTri@upper

xTri <- new("Triangle", triID = "TRI1", type = "paidLoss", startDate=as.Date("2012-01-01"),
frequency="yearly", sim=1, percentile=50)
xTri<-setUpperTriangle(xTri,claimdata,lob="Auto",ctype="H")
xTri@upper


casact/cascsim documentation built on Nov. 12, 2022, 11:53 p.m.