Last chance! 50% off unlimited learning
Sale ends in
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, \dots)
## 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, \dots)
## S3 method for class 'aggregateDist':
mean(x, \dots)
"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 "
"recursive"
and "convolution"
methods: a vector of claim amount probabilities. For
"simulation"
method: a severity simulation model (see
simpf
for detailNULL
. Used only with "recursive"
method."recursive"
and "convolution"
methods."normal"
or "npower"
methods."simulation"
method."recursive"
method; further arguments to be passed to or
from other methods otherwise."recursive"
method stops when the
cumulative distribution function is less than tol
away from 1."recursive"
method."recursive"
method."aggregateDist"
."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.
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 $f_X(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.
model.freq
is vector $p_n$ of the number of claims
probabilities; the first element must be $Pr[N = 0]$.
model.sev
is vector $f_X(x)$ of the (discretized)
claim amount distribution; the first element must be
$f_X(0)$.
The Normal Power 2 approximation of a cumulative distribution function (cdf)
$F(x)$ with mean $\mu$, standard deviation $\sigma$
and skewness $\gamma$ is
nb.simul
of the aggregate claim amount distribution
specified by model.freq
and
model.sev
. simpf
is used for the simulation of
claim amounts, hence both the frequency and severity models can be
mixtures of distributions.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.
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;
simpf
.## 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")
Run the code above in your browser using DataLab