Skip to contents

Calculate risk using a Poisson log-normal model. The number of events per time period is calculated using rpois(runs, lambda) and total loss for each time period using sum(rlnorm(events, meanlog, sdlog)).

Usage

calc_risk(risk, lambda, meanlog, sdlog, runs = 1e+05)

Arguments

risk

Risk name (a string)

lambda

Parameter passed to rpois()

meanlog

Parameter passed to rlnorm()

sdlog

Parameter passed to rlnorm()

runs

Number of simulations

Value

A tibble of runs rows containing the number of events (events), and the total value of losses (losses) for each run.