fit {bootstrap}R Documentation

Description

~~ get the fitted Cumulative Loss Payments ~~

Usage

fit(A, weighted, ...)

Arguments

A ~~an accumulated triangle~~
weighted ~~weighted average~~
...

Note

~~This is a special function, just for bootstrap usage.~~

Author(s)

~~Hai You~~

Examples


## The function is currently defined as
function(A, weighted, ...)  standardGeneric("fit")
setMethod("fit", signature("Triangle", "vector"), function(A, weighted){
        #init a new triagle object,
        m<-new("Triangle", data=A@data, accumulated=TRUE)

        for (n in length(weighted) : 1){
                c<-m@data[,n][!is.na(m@data[,n])]
                for (k in 1: (length(c)-1)){
                        m@data[k,n] <-m@data[k,n+1]/ weighted[n]
                }
        }
        return (m)
})

[Package bootstrap version 1.0-1 Index]