Learn R Programming

actuar (version 0.1-3)

rearrangepf: Reorganization of a portfolio

Description

rearrangepf reorganizes a portfolio of claim amounts stored in a two dimension list.

Usage

rearrangepf(pf)

Arguments

pf
a two dimension list containing individual claim amounts

Value

  • A list made of:
  • aggregatematrix of aggregate losses for each contract and each year
  • frequenciesmatrix of the number of claims per contract and per year
  • severitiesa list of two elements: [object Object],[object Object]

Details

This function takes individual claim amounts of a portfolio of contracts stored in a two dimension list (where each element of the list is a vector of claim amounts) and returns matrices of total claim amounts, number of claims and individual claim amounts.

See Also

simpf to create a portfolio of data

Examples

Run this code
modelfreq <- list(dist1 = "pois",
                  par1 = list(lambda = quote(Lambda * weights)),
                  dist2 = "gamma",
                  par2 = c(shape = 2, rate = 1))
modelsev<-list(dist1 = "lnorm",
               par1 = list(meanlog = quote(Theta), sdlog = 1),
               dist2 = "norm",
               par2 = c(mean = 5, sd = 1))
( x <- simpf(25, 4, modelfreq, modelsev) )
rearrangepf(x$data)

Run the code above in your browser using DataLab