View source: R/features_05_claim_payment_count.R
claim_payment_no  R Documentation 
Simulates and returns the number of partial payments required to settle each of the claims occurring in each of the periods.
claim_payment_no(frequency_vector, claim_size_list, rfun, paramfun, ...)
frequency_vector 
a vector of claim frequencies for all the periods. 
claim_size_list 
list of claim sizes. 
rfun 
optional alternative random sampling function; see Details for default. 
paramfun 
parameters for the random sampling function, as a function of

... 
other arguments/parameters to be passed onto 
Returns a list structure such that the i
th component of the
list gives the number of partial payments required to settle each of the
claims that occurred in period i
. It is assumed that at least one
payment is required i.e. no claims are settled without any single cash
payment.
Let M
represent the number of partial payments associated with a
particular claim. The default simulate_no_pmt_function
is set up
such that if claim_size
\le
claim_size_benchmark_1
,
Pr(M = 1) = Pr(M = 2) = 1/2;
if claim_size_benchmark_1
<
claim_size
\le
claim_size_benchmark_2
,
Pr(M = 2) = 1/3, Pr(M = 3) = 2/3;
if claim_size
> claim_size_benchmark_2
then M
is geometric with minimum 4 and mean
min(8, 4 + log(claim_size/claim_size_benchmark_2)).
Alternative sampling distributions are supported through rfun
(the random
generation function) and paramfun
(which returns the parameters of rfun
as a function of claim_size
). The paramfun
should return the distribution
parameters in a vector, e.g. for gamma distribution paramfun
should
return a value in the format of c(shape = , scale = )
. If a rfun
is
specified without a paramfun
, SynthETIC
will try to proceed without
parameterisation (i.e. directly calling rfun
with claim_size
), and if it
fails, then return an error message.
n_vector < claim_frequency(I = 10)
# with default simulation function
no_payments < claim_payment_no(n_vector, claim_size(n_vector))
no_payments[[1]] # number of payments for claims incurred in period 1
# modify the lower benchmark value
claim_payment_no(n_vector, claim_size(n_vector),
claim_size_benchmark_1 = 5000)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.