Skip to contents

survival(dist, q) is P(X > q), accurate far into the tail; layer_variance(dist, limit, attachment) is the variance of the loss to the layer limit xs attachment (Inf for an unlimited layer), and layer_second_moment(dist, limit, attachment) its second moment E[Y^2], in closed form where the family has one, so layer_variance = layer_second_moment - layer^2. Defined for lognormal, the Pareto-family severities (pareto, piecewise_pareto, log_affine_pareto, generalized_pareto) and for gamma_distribution, tweedie, weibull_distribution, loglogistic_distribution, exponential_distribution, inverse_gamma_distribution, inverse_gaussian_distribution, burr_distribution, beta_distribution, truncated_distribution, affine_distribution, size_of_loss, policy_limits_distribution, mixture_distribution and custom_distribution.

Usage

survival(dist, q, ...)

layer_variance(dist, limit, attachment, ...)

layer_second_moment(dist, limit, attachment, ...)

Arguments

dist

A severity, one of those above.

q

Numeric vector.

...

Unused; for methods.

limit

Layer limit, a single number.

attachment

Layer attachment, a single number.

Value

A numeric vector (survival) or a single number (layer_variance, layer_second_moment).

Examples

p <- pareto(500, 2)
survival(p, c(1000, 2000))
#> [1] 0.2500 0.0625
layer_variance(p, 4000, 1000)
#> [1] 364719
layer_second_moment(p, 4000, 1000)
#> [1] 404719
d <- lognormal(7, 0.5)
survival(d, 3000)
#> [1] 0.02207125
layer_second_moment(d, 4000, 1000)
#> [1] 440441.7