View source: R/fct_simulate_claims.R
simulate_claims | R Documentation |
A function to simulate *transactional* actuarial claims/loss data for Property Casualty Insurance.
simulate_claims(
n_claims = 1000,
start_date = "2015-01-01",
end_date = Sys.Date(),
seed = 12345,
loss_distribution = "lnorm",
params = list(mean_log = 7.5, sd_log = 1.5),
status_prob_open = 0.96,
cache = FALSE,
...
)
n_claims |
Numeric - Number of claims to be simulated. |
start_date , end_date |
Character/Date - Start and End dates for simulation to create claims within (experience_period). |
seed |
Numeric - the seed is used to isolate randomness during statistical simulations. |
loss_distribution |
Character - must be one of the distributions mentioned in the details below. Defaults to lognormal. |
params |
Parameters associated with the specified 'loss_distribution' in a list (i.e. 'list(mean_log = 7.5, sd_log = 1.5)' for lognormal distribution). |
status_prob_open |
Numeric - must be within '0 < x < 1' and represents probability a claim is open when running binomial simulations for claims' status. |
cache |
Boolean/Logical - enable caching? |
... |
If needed |
Severity/Loss Distributions: - Normal: 'norm' - Parameters are 'mean' and 'sd'. - Lognormal: 'lnorm' - Parameters are 'meanlog' and 'sdlog'. - Gamma: 'gamma' - Shape, Rate, Scale - LogGamma: 'lgamma' - Shapelog, Ratelog - Pareto: 'pareto' - Shape and Scale - Weibull: 'weibull' - Shape and Scale - Generalized Beta: 'genbeta' - Shape1, Shape2, Shape3, Rate, Scale
The return value, if any, from executing the function.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.