claim_size {SynthETIC}R Documentation

Claim Size

Description

Simulates and returns the size of each of the claims occurring in each of the periods, given its cumulative distribution function.

Note that claim_size() aims to model the claim sizes without inflation.

Usage

claim_size(frequency_vector, simfun, type = c("r", "p"), ...)

Arguments

frequency_vector

a vector of claim frequencies for all the periods.

simfun

optional alternative sampling distribution; see Details.

type

the type of simfun provided. The default is a random generation function (e.g. rweibull); the alternative "p" is any valid cumulative distribution function (e.g. pweibull).

...

other arguments/parameters to be passed onto simfun.

Details

By default claim_size() assumes a left truncated power normal distribution: S^0.2 ~ Normal (9.5, sd = 3), left truncated at 30. The truncation is done via resampling for rejected values.

Users can opt to use alternative distributions if desired. As discussed in claim_frequency, users can declare such specification through the simfun argument, which takes both random generation functions (type = "r", the default) and cumulative distribution functions (type = "p"). See Examples.

For the latter, claim_size() will first search for the existence of the corresponding r-function. If it notes the existence of such an r-function (e.g. rweibull for simfun = pweibull), it will directly apply the r-function to optimise simulation efficiency. Otherwise, the function uses a numerical inverse transform method for simulation (see simulate_cdf), which may not be the most efficient and can potentially result in errors if an appropriate range is not specified in the optional arguments.

Value

A list of claim sizes such that the ith component of the list gives the sizes for all claims that occurred in period i.

Examples

n_vector <- c(90, 79, 102, 78, 86, 88, 116, 84, 93, 104)
claim_size(n_vector)[[1]] # gives the sizes for all
                          # all claims incurred in period 1

# use some custom pre-defined distribution function
claim_size(n_vector, stats::rweibull, shape = 4, scale = 100000)[[1]]
# equivalently
claim_size(n_vector, stats::pweibull, "p", shape = 4, scale = 100000)[[1]]

[Package SynthETIC version 1.1.0 Index]