# This shows that MCL under "OLS" applied to one triangle
# is equivalent to MackChainLadder using the Mack extrapolation
data(GenIns)
uni1 <- MackChainLadder(GenIns,est.sigma="Mack")
uni2 <- MultiChainLadder(list(GenIns),
fit.method="OLS")
summary(uni1)
summary(uni2)
# show plots
par(mfrow=c(2,2))
plot(uni2,which.plot=1:4)
plot(uni2,which.plot=5)
# This illustrates the use of the "Independence" assumption in
# calculating the Mse, which is equivalent to the result in Buchwalder et al. (2006)
fit.bbmw <- MultiChainLadder(list(GenIns),
fit.method="OLS",
mse.method="Independence")
fit.bbmw
# The following shows the inclusion of intercepts for years 1:7
auto <- as(auto,"triangles")
da1 <- auto[,1:7]
da2 <- auto[,7:10]
coefr <- matrix(0,12,6)
pos=cbind(c(1,2,5,7,9,12),1:6)
coefr[pos] <- 1 #coefficient restriction matrix
int=1:6 # specify which periods need intercepts
restrict.regMat <- c(rep(list(coefr),6),rep(list(NULL),3))
fit1<-MultiChainLadder(da1,"SUR",
int=int,
restrict.regMat=restrict.regMat,
model="GMCL")
fit2<-MultiChainLadder(da2,"OLS")
fit <- Join2Fits(fit1,fit2)
pred <- predict(fit)
mse <- Mse(fit,pred)
fit.int <- JoinFitMse(fit,mse)
## summary statistics
summary(fit.int,portfolio="1+3")@report.summary[[4]]
### residual plots
par(mfrow=c(2,3))
plot(fit.int,which.plot=3:4)
# To reproduce results in Zhang (2010) and see more examples, use:
demo(MultiChainLadder)
Run the code above in your browser using DataLab