Skip to contents

The distribution of S = X_1 + ... + X_N on the severity grid's step, by Panjer's recursion or by FFT. The result's report property records the error: tail_mass (probability above the last point, lumped onto it), aliasing_error (FFT only; check it first) and mean_error.

Usage

compound_distribution(frequency, severity, points, method = c("panjer", "fft"))

Arguments

frequency

A poisson_count, negative_binomial_count or binomial_count.

severity

A grid_distribution, usually from discretize().

points

Number of points in the aggregate grid.

method

"panjer", or "fft" for large claim counts where Panjer underflows.

Value

A grid_distribution whose report describes the calculation.

Examples

sev <- grid_distribution(1, c(0.1, 0.3, 0.25, 0.2, 0.1, 0.05))
agg <- compound_distribution(poisson_count(3), sev, points = 100)
mean(agg)
#> [1] 6.15
agg@report$tail_mass
#> [1] 2.220446e-16