setTrend-methods: Set the trend with an Index Object.

Description Usage Arguments Examples

Description

Set the trend with an Index Object.

Usage

1
2
3
4
setTrend(this, ...) <- value

## S4 replacement method for signature 'FitDist,Index'
setTrend(this) <- value

Arguments

this

FitDist Object

...

Additional function arguments

value

An Index Object

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
library(cascsim)
data(claimdata)

#frequecy fitting example
findex <- new("Index", startDate = as.Date("2012-01-01"), tabulate=TRUE, monthlyIndex = c(rep(1,11),
cumprod(c(1,rep(1.5^(1/12),11))),cumprod(c(1.5,rep((1.3/1.5)^(1/12),11))),
cumprod(c(1.3,rep((1.35/1.3)^(1/12),11))),cumprod(c(1.35,rep((1.4/1.35)^(1/12),11))),1.4))
rawdata <- as.data.frame(as.Date(claimdata[(claimdata[,"LoB"]=="Auto" & 
claimdata[,"Type"]=="H"),]$occurrenceDate))
colnames(rawdata)<-"occurrenceDate"
xFit <- new("FitDist", observation=rawdata, startDate = as.Date("2012-01-01"),
method="mle",ifreq=TRUE,idate=TRUE, freq="Monthly")
setTrend(xFit) <- findex
xFit@trend

cascsim documentation built on Jan. 13, 2020, 5:07 p.m.