to_SynthETIC: Conversion to SynthETIC Format

View source: R/to_SynthETIC.R

to_SynthETICR Documentation

Conversion to SynthETIC Format

Description

Converts a vector of simulated quantities (e.g. claim occurrence times, claim sizes) to a list format consistent with what is used for SynthETIC simulation; to be used when user wishes to replace one or more of the SynthETIC modules with their own.

Usage

to_SynthETIC(x, frequency_vector, level = c("clm", "pmt"), no_payments_list)

Arguments

x

a vector of simulated quantities for all the claims.

frequency_vector

a vector of claim frequencies for all the periods.

level

level of the data provided; one of "clm" (claim, which is the default) or "pmt" (payment).

no_payments_list

list of number of partial payments; only required if level = "pmt".

Details

It is assumed that the simulated quantities in x is provided in chronological order, e.g. if there are 30 claims in period 1 and x is on a "clm" level, then the first 30 elements of x should give the measures for those 30 claims. Likewise, if x is on a "pmt" level, and the first claim in period 1 has 5 payments, then the first 5 elements of x should give the measures for those 5 payments.

Value

A list of quantities such that the ith component of the list gives the corresponding measure for all claims that occurred in period i.

Examples

freq <- claim_frequency()
my_claims <- rweibull(sum(freq), shape = 4, scale = 100000)
claim_sizes <- to_SynthETIC(my_claims, freq)

SynthETIC documentation built on May 29, 2024, 8:47 a.m.