claim_payment_delay: Inter-Partial Delays

View source: R/features_07_claim_payment_time.R

claim_payment_delayR Documentation

Inter-Partial Delays

Description

Simulates and returns the inter-partial delays (i.e. the delay of one partial payment relative to the previous) of each payment for each of the claims occurring in each of the periods.

Usage

claim_payment_delay(
  frequency_vector,
  claim_size_list,
  no_payments_list,
  settlement_list,
  rfun,
  paramfun,
  ...
)

Arguments

frequency_vector

a vector of claim frequencies for all the periods.

claim_size_list

list of claim sizes.

no_payments_list

list of number of partial payments.

settlement_list

list of settlement delays.

rfun

optional alternative random sampling function; see Details for default.

paramfun

parameters for the random sampling function, as a function of claim_size, setldel; see Details.

...

other arguments/parameters to be passed onto paramfun.

Details

Returns a compound list structure such that the jth component of the ith sub-list gives the payment delay pattern (as a vector) for the jth claim of occurrence period i.

The default rfun is split into 2 cases.

Case 1: claims with at least 4 partial payments. The simulation takes 2 steps. First we sample the last payment delay from a Weibull distribution with mean = 1 quarter (automatically converted to the relevant time_unit, a global variable that the user is required to define at the top of their code) and CoV = 20%. Then we sample the remaining payment delays from a second Weibull distribution with CoV at 35% and mean = target mean settlement delay (see claim_closure) divided by the number of payments.

Case 2: claims with less than 4 partial payments. Proceed as in Case 1 but without separating out the simulation of the last payment delay (i.e. ignore step 1).

Examples

# set up
n_vector <- claim_frequency(I = 10)
claim_sizes <- claim_size(n_vector)
no_payments <- claim_payment_no(n_vector, claim_sizes)
setldel <- claim_closure(n_vector, claim_sizes)

# with default setting
pmtdel <- claim_payment_delay(n_vector, claim_sizes, no_payments, setldel)
pmtdel[[1]][[1]] # payment delays for claim 1 of occurrence period 1

# with some custom rfun
# simplistic case: payments times are uniformly distributed
my_func <- function(n, setldel) {
  prop <- runif(n)
  prop <- prop / sum(prop)
  setldel * prop
}
mypayments <- claim_payment_delay(n_vector, claim_sizes, no_payments, setldel,
                                  rfun = my_func)
# inter-partial delays for claim 1 of occurrence period 1
mypayments[[1]][[1]]

SynthETIC documentation built on Sept. 3, 2023, 5:06 p.m.