aggregateDist {actuar} | R Documentation |
Compute the aggregate claim amount cumulative distribution function of a portfolio over a period using one of five methods.
aggregateDist(method = c("recursive", "convolution", "normal", "npower", "simulation"), model.freq = NULL, model.sev = NULL, p0 = NULL, x.scale = 1, moments, nb.simul, ..., tol = 1e-06, maxit = 500, echo = FALSE) ## S3 method for class 'aggregateDist': print(x, ...) ## S3 method for class 'aggregateDist': plot(x, xlim, ylab = expression(F[S](x)), main = "Aggregate Claim Amount Distribution", sub = comment(x), ...) ## S3 method for class 'aggregateDist': summary(object, ...) ## S3 method for class 'aggregateDist': mean(x, ...)
method |
method to be used |
model.freq |
for "recursive" method: a character string
giving the name of a distribution in the (a, b, 0) or (a,
b, 1) families of distributions. For "convolution" method:
a vector of claim number probabilities. For "simulation"
method: a frequency simulation model (see simul for
details) or NULL . Ignored with normal and
npower methods. |
model.sev |
for "recursive" and "convolution"
methods: a vector of claim amount probabilities. For
"simulation" method: a severity simulation model (see
simul for details) or NULL . Ignored with
normal and npower methods. |
p0 |
arbitrary probability at zero for the frequency
distribution. Creates a zero-modified or zero-truncated
distribution if not NULL . Used only with "recursive"
method. |
x.scale |
value of an amount of 1 in the severity model (monetary
unit). Used only with "recursive" and "convolution"
methods. |
moments |
vector of the true moments of the aggregate claim
amount distribution; required only by the "normal" or
"npower" methods. |
nb.simul |
number of simulations for the "simulation" method. |
... |
parameters of the frequency distribution for the
"recursive" method; further arguments to be passed to or
from other methods otherwise. |
tol |
the recursion in the "recursive" method stops when the
cumulative distribution function is less than tol away from 1. |
maxit |
maximum number of recursions in the "recursive"
method. |
echo |
logical; echo the recursions to screen in the
"recursive" method. |
x, object |
an object of class "aggregateDist" . |
xlim |
numeric of length 2; the x limits of the plot. |
ylab |
label of the y axis. |
main |
main title. |
sub |
subtitle, defaulting to the calculation method. |
aggregateDist
returns a function to compute the cumulative
distribution function (cdf) of the aggregate claim amount distribution
in any point.
The "recursive"
method computes the cdf using the Panjer
algorithm; the "convolution"
method using convolutions; the
"normal"
method using a normal approximation; the
"npower"
method using the Normal Power 2 approximation; the
"simulation"
method using simulations. More details follow.
A function of class "aggregateDist"
, inheriting from the
"function"
class when using normal and Normal Power
approximations and additionally inheriting from the "ecdf"
and
"stepfun"
classes when other methods are used.
There are methods available to summarize (summary
), represent
(print
), plot (plot
), compute quantiles
(quantile
) and compute the mean (mean
) of
"aggregateDist"
objects.
The frequency distribution is a member of the (a, b, 0) family
of discrete distributions if p0
is NULL
and a member of
the (a, b, 1) family if p0
is specified.
model.freq
must be one of "binomial"
,
"geometric"
, "negative binomial"
, "poisson"
or
"logarithmic"
(these can abbreviated). The parameters of the
frequency distribution must be specified using names identical to the
arguments of functions dbinom
, dgeom
,
dnbinom
, dpois
and dnbinom
,
respectively. (The logarithmic distribution is a limiting case of the
negative binomial distribution with size parameter equal to 0.)
model.sev
is a vector of the (discretized) claim amount
distribution X; the first element must be fx(0) = Pr[X = 0].
Failure to obtain a cumulative distribution function less than
tol
away from 1 within maxit
iterations is often due
to a too coarse discretization of the severity distribution.
The cumulative distribution function (cdf) Fs(x) of the aggregate claim amount of a portfolio in the collective risk model is
Fs(x) = sum(n; Fx^*n(x) * pn)
for x = 0, 1, ...; pn = Pr[N = n] is the frequency probability mass function and Fx^*n(x) is the cdf of the nth convolution of the (discrete) claim amount random variable.
model.freq
is vector pn of the number of claims
probabilities; the first element must be Pr[N = 0].
model.sev
is vector fx(x) of the (discretized)
claim amount distribution; the first element must be
fx(0).
The Normal approximation of a cumulative distribution function (cdf) F(x) with mean m and standard deviation s is
F(x) ~= pnorm((x - m)/s).
The Normal Power 2 approximation of a cumulative distribution function (cdf) F(x) with mean m, standard deviation s and skewness g is
F(x) ~= pnorm(-3/g + sqrt(9/g^2 + 1 + (6/g) * (x - m)/s)).
This formula is valid only for the right-hand tail of the distribution and skewness should not exceed unity.
This methods returns the empirical distribution function of a sample
of size nb.simul
of the aggregate claim amount distribution
specified by model.freq
and
model.sev
. simul
is used for the simulation of
claim amounts, hence both the frequency and severity models can be
mixtures of distributions.
Vincent Goulet vincent.goulet@act.ulaval.ca and Louis-Philippe Pouliot
Klugman, S. A., Panjer, H. H. and Willmot, G. E. (2004), Loss Models, From Data to Decisions, Second Edition, Wiley.
Daykin, C.D., Pentikäinen, T. and Pesonen, M. (1994), Practical Risk Theory for Actuaries, Chapman & Hall.
discretize
to discretize a severity distribution;
mean.aggregateDist
to compute the mean of the
distribution;
quantile.aggregateDist
to compute the quantiles or the
Value at Risk;
CTE.aggregateDist
to compute the Conditional Tail
Expectation;
simul
.
## Convolution method (example 6.6 of Klugman et al. (2004)) fx <- c(0, 0.15, 0.2, 0.25, 0.125, 0.075, 0.05, 0.05, 0.05, 0.025, 0.025) pn <- c(0.05, 0.1, 0.15, 0.2, 0.25, 0.15, 0.06, 0.03, 0.01) Fs <- aggregateDist("convolution", model.freq = pn, model.sev = fx, x.scale = 25) summary(Fs) c(Fs(0), diff(Fs(25 * 0:21))) # probability mass function plot(Fs) ## Recursive method Fs <- aggregateDist("recursive", model.freq = "poisson", model.sev = fx, lambda = 3, x.scale = 25) plot(Fs) ## Normal Power approximation Fs <- aggregateDist("npower", moments = c(200, 200, 0.5)) Fs(210) ## Simulation method model.freq <- expression(data = rpois(3)) model.sev <- expression(data = rgamma(100, 2)) Fs <- aggregateDist("simulation", nb.simul = 1000, model.freq, model.sev) mean(Fs) plot(Fs) ## Evaluation of ruin probabilities using Beekman's formula with ## Exponential(1) claim severity, Poisson(1) frequency and premium rate ## c = 1.2. fx <- discretize(pexp(x, 1), from = 0, to = 100, method = "lower") phi0 <- 0.2/1.2 Fs <- aggregateDist(method = "recursive", model.freq = "geometric", model.sev = fx, prob = phi0) 1 - Fs(400) # approximate ruin probability u <- 0:100 plot(u, 1 - Fs(u), type = "l", main = "Ruin probability")