Title: | The Pareto, Piecewise Pareto and Generalized Pareto Distribution |
---|---|
Description: | Utilities for the Pareto, piecewise Pareto and generalized Pareto distribution that are useful for reinsurance pricing. In particular, the package provides a non-trivial algorithm that can be used to match the expected losses of a tower of reinsurance layers with a layer-independent collective risk model. The theoretical background of the matching algorithm and most other methods are described in Ulrich Riegel (2018) <doi:10.1007/s13385-018-0177-3>. |
Authors: | Ulrich Riegel [aut, cre] |
Maintainer: | Ulrich Riegel <[email protected]> |
License: | GPL (>= 2) |
Version: | 2.4.5 |
Built: | 2024-11-12 03:39:59 UTC |
Source: | https://github.com/ulrichriegel/pareto |
Calculates the density function of the generalized Pareto distribution
dGenPareto(x, t, alpha_ini, alpha_tail, truncation = NULL)
dGenPareto(x, t, alpha_ini, alpha_tail, truncation = NULL)
x |
Numeric. The function evaluates the density at x. |
t |
Numeric. Threshold of the Pareto distribution. |
alpha_ini |
Numeric. Initial Pareto alpha. |
alpha_tail |
Numeric. Tail Pareto alpha. |
truncation |
Numeric. If truncation is not NULL and truncation > t, then the generalized Pareto distribution is truncated at truncation. |
Density function of the Pareto distribution with parameters t
, alpha_ini
and alpha_tail
evaluated at x
x <- 0:10 * 1000 dGenPareto(x, 1000, 1, 3) dGenPareto(x, 1000, 1, 3, truncation = 5000)
x <- 0:10 * 1000 dGenPareto(x, 1000, 1, 3) dGenPareto(x, 1000, 1, 3, truncation = 5000)
Calculates the density function of the Pareto distribution
dPareto(x, t, alpha, truncation = NULL)
dPareto(x, t, alpha, truncation = NULL)
x |
Numeric. The function evaluates the density at x. |
t |
Numeric. Threshold of the Pareto distribution. |
alpha |
Numeric. Pareto alpha. |
truncation |
Numeric. If truncation is not NULL and truncation > t, then the Pareto distribution is truncated at truncation. |
Density function of the Pareto distribution with parameters t
and alpha
evaluated at x
x <- 0:10 * 1000 dPareto(x, 1000, 2) dPareto(x, 1000, 2, truncation = 5000)
x <- 0:10 * 1000 dPareto(x, 1000, 2) dPareto(x, 1000, 2, truncation = 5000)
Calculates the density function of the piecewise Pareto distribution
dPiecewisePareto(x, t, alpha, truncation = NULL, truncation_type = "lp")
dPiecewisePareto(x, t, alpha, truncation = NULL, truncation_type = "lp")
x |
Numeric. The function evaluates the density at |
t |
Numeric vector. Thresholds of the piecewise Pareto distribution. |
alpha |
Numeric vector. |
truncation |
Numeric. If truncation is not NULL and truncation > t, then the Pareto distribution is truncated at truncation. |
truncation_type |
Character. If |
Density function of the piecewise Pareto distribution with parameter vectors t
and alpha
evaluated at x
t <- c(1000, 2000, 3000) alpha <- c(1, 1.5, 2) x <- 0:10 * 1000 dPiecewisePareto(x, t, alpha) dPiecewisePareto(x, t, alpha, truncation = 5000, truncation_type = "lp") dPiecewisePareto(x, t, alpha, truncation = 5000, truncation_type = "wd")
t <- c(1000, 2000, 3000) alpha <- c(1, 1.5, 2) x <- 0:10 * 1000 dPiecewisePareto(x, t, alpha) dPiecewisePareto(x, t, alpha, truncation = 5000, truncation_type = "lp") dPiecewisePareto(x, t, alpha, truncation = 5000, truncation_type = "wd")
Example data: Attachment Points
Example1_AP
Example1_AP
An object of class numeric
of length 5.
Example data: Expected Losses
Example1_EL
Example1_EL
An object of class numeric
of length 5.
Calculates the expected frequency in excess of a threshold for a collective model
Excess_Frequency(CollectiveModel, x = 0)
Excess_Frequency(CollectiveModel, x = 0)
CollectiveModel |
A collective model object. Currently only |
x |
Numeric. Threshold. |
The expected frequency in excess of x
for the given CollectiveModel
PPPM <- PiecewisePareto_Match_Layer_Losses(Example1_AP, Example1_EL) PPPM Excess_Frequency(PPPM, c(-Inf, 0, 1000, 2000, 3000, Inf))
PPPM <- PiecewisePareto_Match_Layer_Losses(Example1_AP, Example1_EL) PPPM Excess_Frequency(PPPM, c(-Inf, 0, 1000, 2000, 3000, Inf))
Calculates the expected frequency in excess of a threshold for a PGP_model
## S3 method for class 'PGP_Model' Excess_Frequency(CollectiveModel, x = 0)
## S3 method for class 'PGP_Model' Excess_Frequency(CollectiveModel, x = 0)
CollectiveModel |
PGP_Model object. |
x |
Numeric. Threshold. |
The expected frequency in excess of x
for the given CollectiveModel
PGPM <- PGP_Model(2, 1000, 1, 2, dispersion = 2) PGPM Excess_Frequency(PGPM, c(-Inf, 0, 1000, 2000, 3000, Inf))
PGPM <- PGP_Model(2, 1000, 1, 2, dispersion = 2) PGPM Excess_Frequency(PGPM, c(-Inf, 0, 1000, 2000, 3000, Inf))
Calculates the expected frequency in excess of a threshold for a PPP_model
## S3 method for class 'PPP_Model' Excess_Frequency(CollectiveModel, x = 0)
## S3 method for class 'PPP_Model' Excess_Frequency(CollectiveModel, x = 0)
CollectiveModel |
PPP_Model object. |
x |
Numeric. Threshold. |
The expected frequency in excess of x
for the given CollectiveModel
PPPM <- PiecewisePareto_Match_Layer_Losses(Example1_AP, Example1_EL) PPPM Excess_Frequency(PPPM, c(-Inf, 0, 1000, 2000, 3000, Inf))
PPPM <- PiecewisePareto_Match_Layer_Losses(Example1_AP, Example1_EL) PPPM Excess_Frequency(PPPM, c(-Inf, 0, 1000, 2000, 3000, Inf))
Fits a PPP_Model that matches the values of a PML curve
Fit_PML_Curve( return_periods, amounts, tail_alpha = 2, truncation = NULL, truncation_type = "lp", dispersion = 1 )
Fit_PML_Curve( return_periods, amounts, tail_alpha = 2, truncation = NULL, truncation_type = "lp", dispersion = 1 )
return_periods |
Numeric vector. Vector containing the return periods of the PML curve. |
amounts |
Numeric vector. Vector containing the loss amounts corresponding to the return periods. |
tail_alpha |
Numerical. Pareto alpha that is used above the highest amount of the PML curve. |
truncation |
Numeric. If |
truncation_type |
Character. If |
dispersion |
Numerical. Dispersion of the claim count distribution in the resulting PPP_Model. |
A PPP_Model object that contains the information about a collective model with a Panjer distributed claim count and a Piecewise Pareto distributed severity. The object contains the following elements:
FQ
Numerical. Frequency in excess of the lowest threshold of the piecewise Pareto distribution
t
Numeric vector. Vector containing the thresholds for the piecewise Pareto distribution
alpha
Numeric vector. Vector containing the Pareto alphas of the piecewise Pareto distribution
truncation
Numerical. If truncation
is not NULL
and truncation > max(t)
, then the distribution is truncated at truncation
.
truncation_type
Character. If truncation_type = "wd"
then the whole distribution is truncated. If truncation_type = "lp"
then a truncated Pareto is used for the last piece.
dispersion
Numerical. Dispersion of the Panjer distribution (i.e. variance to mean ratio).
Status
Numerical indicator: 0 = success, 1 = some information has been ignored, 2 = no solution found
Comment
Character. Information on whether the fit was successful
return_periods <- c(1, 5, 10, 20, 50, 100) amounts <- c(1000, 4000, 7000, 10000, 13000, 14000) fit <- Fit_PML_Curve(return_periods, amounts) 1 / Excess_Frequency(fit, amounts) fit <- Fit_PML_Curve(return_periods, amounts, tail_alpha = 1.5, truncation = 20000, truncation_type = "wd") 1 / Excess_Frequency(fit, amounts)
return_periods <- c(1, 5, 10, 20, 50, 100) amounts <- c(1000, 4000, 7000, 10000, 13000, 14000) fit <- Fit_PML_Curve(return_periods, amounts) 1 / Excess_Frequency(fit, amounts) fit <- Fit_PML_Curve(return_periods, amounts, tail_alpha = 1.5, truncation = 20000, truncation_type = "wd") 1 / Excess_Frequency(fit, amounts)
The function fits a collective model to a wishlist of references (expected layer losses and excess frequencies). The function allows to specify the family of the severity distribution that is used. Depending on this distribution family the function works slightly differently:
For the severity distribution PiecewisePareto
the function returns a PPP_Model
that satisfies all the references
For the severity distribution Pareto
the function returns a PPP_Model
that minimizes the squared relative deviations from the references
For the severity distribution GenPareto
the function returns a PGP_Model
that minimizes the squared relative deviations from the references
Fit_References( Covers = NULL, Attachment_Points = NULL, Expected_Layer_Losses = NULL, Thresholds = NULL, Frequencies = NULL, model_threshold = min(c(Attachment_Points, Thresholds)), default_alpha = 2, dispersion = 1, alpha_max = 100, severity_distribution = "PiecewisePareto", ignore_inconsistent_references = FALSE )
Fit_References( Covers = NULL, Attachment_Points = NULL, Expected_Layer_Losses = NULL, Thresholds = NULL, Frequencies = NULL, model_threshold = min(c(Attachment_Points, Thresholds)), default_alpha = 2, dispersion = 1, alpha_max = 100, severity_distribution = "PiecewisePareto", ignore_inconsistent_references = FALSE )
Covers |
Numeric vector. Vector containing the covers of the layers from the wishlist. |
Attachment_Points |
Numeric vector. Vector containing the attachment points of the layers from the wishlist. |
Expected_Layer_Losses |
Numeric vector. Vector containing the expected losses of the layers from the wishlist. |
Thresholds |
Numeric vector. Contains the thresholds from the wishlist for which excess frequencies are given. |
Frequencies |
Numeric vector. Expected frequencies excess the |
model_threshold |
Numerical. Lowest threshold of the fitted piecewise Pareto distribution. |
default_alpha |
Numerical. Default alpha for situations where an alpha has to be selected. |
dispersion |
Numerical. Dispersion of the claim count distribution in the resulting PPP_Model. |
alpha_max |
Numerical. Maximum alpha to be used for the matching. |
severity_distribution |
Character. Implemented distributions: "PiecewisePareto" (default), "Pareto" and "GenPareto". |
ignore_inconsistent_references |
Logical. If TRUE then inconsistent references are ignored in case of the piecewise Pareto distribution and the other references are used to fit the model |
For severity_distribution = "PiecewisePareto" or "Pareto": A PPP_Model object that contains the information about a collective model with a Panjer distributed claim count and a Piecewise Pareto distributed severity. The object contains the following elements:
FQ
Numerical. Frequency in excess of the lowest threshold of the piecewise Pareto distribution
t
Numeric vector. Vector containing the thresholds for the piecewise Pareto distribution
alpha
Numeric vector. Vector containing the Pareto alphas of the piecewise Pareto distribution
truncation
Numerical. If truncation
is not NULL
and truncation > max(t)
, then the distribution is truncated at truncation
.
truncation_type
Character. If truncation_type = "wd"
then the whole distribution is truncated. If truncation_type = "lp"
then a truncated Pareto is used for the last piece.
dispersion
Numerical. Dispersion of the Panjer distribution (i.e. variance to mean ratio).
Status
Numerical indicator: 0 = success, 1 = some information has been ignored, 2 = no solution found
Comment
Character. Information on whether the fit was successful
For severity_distribution = "GenPareto": A PGP_Model object that contains the information about a collective model with a Panjer distributed claim count and a Piecewise Pareto distributed severity. The object contains the following elements:
FQ
Expected claim count of the collective model.
t
Numeric. Threshold of the Pareto distribution.
alpha_ini
Numeric. Initial Pareto alpha (at t
).
alpha_tail
Numeric. Tail Pareto alpha.
truncation
If truncation
is not NULL
and truncation > t
, then the Pareto distribution is truncated at truncation
.
dispersion
Numerical. Dispersion of the Panjer distribution (i.e. variance to mean ratio).
Status
Numerical indicator: 0 = success, 1 = some information has been ignored, 2 = no solution found
Comment
Character. Information on whether the fit was successful
covers <- c(1000, 1000, 1000) att_points <- c(1000, 2000, 5000) exp_losses <- c(100, 50, 10) thresholds <- c(4000, 10000) fqs <- c(0.04, 0.005) fit <- Fit_References(covers, att_points, exp_losses, thresholds, fqs) Layer_Mean(fit, covers, att_points) Excess_Frequency(fit, thresholds) fit <- Fit_References(covers, att_points, exp_losses, thresholds, fqs, severity_distribution = "Pareto") Layer_Mean(fit, covers, att_points) Excess_Frequency(fit, thresholds) fit <- Fit_References(covers, att_points, exp_losses, severity_distribution = "GenPareto") Layer_Mean(fit, covers, att_points)
covers <- c(1000, 1000, 1000) att_points <- c(1000, 2000, 5000) exp_losses <- c(100, 50, 10) thresholds <- c(4000, 10000) fqs <- c(0.04, 0.005) fit <- Fit_References(covers, att_points, exp_losses, thresholds, fqs) Layer_Mean(fit, covers, att_points) Excess_Frequency(fit, thresholds) fit <- Fit_References(covers, att_points, exp_losses, thresholds, fqs, severity_distribution = "Pareto") Layer_Mean(fit, covers, att_points) Excess_Frequency(fit, thresholds) fit <- Fit_References(covers, att_points, exp_losses, severity_distribution = "GenPareto") Layer_Mean(fit, covers, att_points)
Calculates the expected loss of a generalized Pareto distribution in a reinsurance layer
GenPareto_Layer_Mean( Cover, AttachmentPoint, t, alpha_ini, alpha_tail, truncation = NULL )
GenPareto_Layer_Mean( Cover, AttachmentPoint, t, alpha_ini, alpha_tail, truncation = NULL )
Cover |
Numeric. Cover of the reinsurance layer. Use |
AttachmentPoint |
Numeric. Attachment point of the reinsurance layer. |
t |
Numeric. Threshold of the Pareto distribution. If |
alpha_ini |
Numeric. Initial Pareto alpha (at |
alpha_tail |
Numeric. Tail Pareto alpha. |
truncation |
Numeric. If |
The expected loss of the (truncated) Pareto distribution with parameters t
and alpha
in the layer
Cover
xs AttachmentPoint
GenPareto_Layer_Mean(4000, 1000, 1000, 1, 3) GenPareto_Layer_Mean(4000, 1000, t = 1000, alpha_ini = 1, alpha_tail = 3) GenPareto_Layer_Mean(4000, 1000, t = 5000, alpha_ini = 1, alpha_tail = 3) GenPareto_Layer_Mean(4000, 1000, t = 1000, alpha_ini = 1, alpha_tail = 3, truncation = 5000) GenPareto_Layer_Mean(9000, 1000, t = 1000, alpha_ini = 1, alpha_tail = 3, truncation = 5000)
GenPareto_Layer_Mean(4000, 1000, 1000, 1, 3) GenPareto_Layer_Mean(4000, 1000, t = 1000, alpha_ini = 1, alpha_tail = 3) GenPareto_Layer_Mean(4000, 1000, t = 5000, alpha_ini = 1, alpha_tail = 3) GenPareto_Layer_Mean(4000, 1000, t = 1000, alpha_ini = 1, alpha_tail = 3, truncation = 5000) GenPareto_Layer_Mean(9000, 1000, t = 1000, alpha_ini = 1, alpha_tail = 3, truncation = 5000)
Calculates the second moment of a generalized Pareto distribution in a reinsurance layer
GenPareto_Layer_SM( Cover, AttachmentPoint, t, alpha_ini, alpha_tail, truncation = NULL )
GenPareto_Layer_SM( Cover, AttachmentPoint, t, alpha_ini, alpha_tail, truncation = NULL )
Cover |
Numeric. Cover of the reinsurance layer. Use |
AttachmentPoint |
Numeric. Attachment point of the reinsurance layer. |
t |
Numeric. Threshold of the Pareto distribution. If |
alpha_ini |
Numeric. Initial Pareto alpha (at |
alpha_tail |
Numeric. Tail Pareto alpha. |
truncation |
Numeric. If |
The second moment of the (truncated) generalized Pareto distribution with parameters t
, alpha_ini
and alpha_tail
in the layer
Cover
xs AttachmentPoint
GenPareto_Layer_SM(4000, 1000, 1000, 1, 2) GenPareto_Layer_SM(4000, 1000, t = 1000, alpha_ini = 1, alpha_tail = 3) GenPareto_Layer_SM(4000, 1000, t = 5000, alpha_ini = 1, alpha_tail = 3) GenPareto_Layer_SM(4000, 1000, t = 1000, alpha_ini = 1, alpha_tail = 3, truncation = 5000) GenPareto_Layer_SM(9000, 1000, t = 1000, alpha_ini = 1, alpha_tail = 3, truncation = 5000)
GenPareto_Layer_SM(4000, 1000, 1000, 1, 2) GenPareto_Layer_SM(4000, 1000, t = 1000, alpha_ini = 1, alpha_tail = 3) GenPareto_Layer_SM(4000, 1000, t = 5000, alpha_ini = 1, alpha_tail = 3) GenPareto_Layer_SM(4000, 1000, t = 1000, alpha_ini = 1, alpha_tail = 3, truncation = 5000) GenPareto_Layer_SM(9000, 1000, t = 1000, alpha_ini = 1, alpha_tail = 3, truncation = 5000)
Calculates the variance of a generalized Pareto distribution in a reinsurance layer
GenPareto_Layer_Var( Cover, AttachmentPoint, t, alpha_ini, alpha_tail, truncation = NULL )
GenPareto_Layer_Var( Cover, AttachmentPoint, t, alpha_ini, alpha_tail, truncation = NULL )
Cover |
Numeric. Cover of the reinsurance layer. Use |
AttachmentPoint |
Numeric. Attachment point of the reinsurance layer. |
t |
Numeric. Threshold of the Pareto distribution. If |
alpha_ini |
Numeric. Initial Pareto alpha (at |
alpha_tail |
Numeric. Tail Pareto alpha. |
truncation |
Numeric. If |
Variance of the (truncated) generalized Pareto distribution with parameters t
, alpha_ini
and alpha_tail
in the layer
Cover
xs AttachmentPoint
GenPareto_Layer_Var(4000, 1000, 1000, 1, 2) GenPareto_Layer_Var(4000, 1000, t = 1000, alpha_ini = 1, alpha_tail = 3) GenPareto_Layer_Var(4000, 1000, t = 5000, alpha_ini = 1, alpha_tail = 3) GenPareto_Layer_Var(4000, 1000, t = 1000, alpha_ini = 1, alpha_tail = 3, truncation = 5000) GenPareto_Layer_Var(9000, 1000, t = 1000, alpha_ini = 1, alpha_tail = 3, truncation = 5000)
GenPareto_Layer_Var(4000, 1000, 1000, 1, 2) GenPareto_Layer_Var(4000, 1000, t = 1000, alpha_ini = 1, alpha_tail = 3) GenPareto_Layer_Var(4000, 1000, t = 5000, alpha_ini = 1, alpha_tail = 3) GenPareto_Layer_Var(4000, 1000, t = 1000, alpha_ini = 1, alpha_tail = 3, truncation = 5000) GenPareto_Layer_Var(9000, 1000, t = 1000, alpha_ini = 1, alpha_tail = 3, truncation = 5000)
Calculates the maximum likelihood estimators of the parameters alpha_ini and alpha_tail of a generalized Pareto distribution with known threshold and (if applicable) known truncation
GenPareto_ML_Estimator_Alpha( losses, t, truncation = NULL, reporting_thresholds = NULL, is.censored = NULL, weights = NULL, alpha_min = 0.001, alpha_max = 10 )
GenPareto_ML_Estimator_Alpha( losses, t, truncation = NULL, reporting_thresholds = NULL, is.censored = NULL, weights = NULL, alpha_min = 0.001, alpha_max = 10 )
losses |
Numeric vector. Losses that are used for the ML estimation. |
t |
Numeric or numeric vector. Threshold of the generalized Pareto distribution. Alternatively, |
truncation |
Numeric. If |
reporting_thresholds |
Numeric vector. Allows to enter loss specific reporting thresholds. If |
is.censored |
Logical vector. |
weights |
Numeric vector. Weights for the losses. For instance |
alpha_min |
Numeric. Lower bound for the estimated alphas. |
alpha_max |
Numeric. Upper bound for the estimated alphas. |
Maximum likelihood estimator for the parameters alpha_ini
and alpha_tail
of a generalized Pareto distribution with threshold t
given the observations losses
losses <- rGenPareto(1000, 1000, 2,3) GenPareto_ML_Estimator_Alpha(losses, 1000) losses <- rGenPareto(1000, 1000, 2, 1, truncation = 10000) GenPareto_ML_Estimator_Alpha(losses, 1000) GenPareto_ML_Estimator_Alpha(losses, 1000, truncation = 10000) t <- 1000 alpha_ini <- 1 alpha_tail <- 3 losses <- rGenPareto(5000, t, alpha_ini, alpha_tail) reporting_thresholds <- rPareto(5000, 1000, 3) reported <- losses > reporting_thresholds losses <- losses[reported] reporting_thresholds <- reporting_thresholds[reported] GenPareto_ML_Estimator_Alpha(losses, t) GenPareto_ML_Estimator_Alpha(losses, t, reporting_thresholds = reporting_thresholds) limit <- 3000 censored <- losses > limit losses[censored] <- limit reported <- losses > reporting_thresholds losses <- losses[reported] censored <- censored[reported] reporting_thresholds <- reporting_thresholds[reported] GenPareto_ML_Estimator_Alpha(losses, t, reporting_thresholds = reporting_thresholds) GenPareto_ML_Estimator_Alpha(losses, t, reporting_thresholds = reporting_thresholds, is.censored = censored) losses <- c(190, 600, 120, 270, 180, 120) w <- rep(1, length(losses)) w[1] <- 3 losses2 <- c(losses, losses[1], losses[1]) GenPareto_ML_Estimator_Alpha(losses, 100, weights = w) GenPareto_ML_Estimator_Alpha(losses2, 100)
losses <- rGenPareto(1000, 1000, 2,3) GenPareto_ML_Estimator_Alpha(losses, 1000) losses <- rGenPareto(1000, 1000, 2, 1, truncation = 10000) GenPareto_ML_Estimator_Alpha(losses, 1000) GenPareto_ML_Estimator_Alpha(losses, 1000, truncation = 10000) t <- 1000 alpha_ini <- 1 alpha_tail <- 3 losses <- rGenPareto(5000, t, alpha_ini, alpha_tail) reporting_thresholds <- rPareto(5000, 1000, 3) reported <- losses > reporting_thresholds losses <- losses[reported] reporting_thresholds <- reporting_thresholds[reported] GenPareto_ML_Estimator_Alpha(losses, t) GenPareto_ML_Estimator_Alpha(losses, t, reporting_thresholds = reporting_thresholds) limit <- 3000 censored <- losses > limit losses[censored] <- limit reported <- losses > reporting_thresholds losses <- losses[reported] censored <- censored[reported] reporting_thresholds <- reporting_thresholds[reported] GenPareto_ML_Estimator_Alpha(losses, t, reporting_thresholds = reporting_thresholds) GenPareto_ML_Estimator_Alpha(losses, t, reporting_thresholds = reporting_thresholds, is.censored = censored) losses <- c(190, 600, 120, 270, 180, 120) w <- rep(1, length(losses)) w[1] <- 3 losses2 <- c(losses, losses[1], losses[1]) GenPareto_ML_Estimator_Alpha(losses, 100, weights = w) GenPareto_ML_Estimator_Alpha(losses2, 100)
Checks if the class of an object is 'PGP_Model'
is.PGP_Model(x)
is.PGP_Model(x)
x |
Object to be checked. |
PGPM <- PGP_Model(2, 1000, 1, 2, dispersion = 2) PGPM is.valid.PGP_Model(PGPM) is.valid.PGP_Model(PGPM, comment = TRUE) PGPM$alpha_tail <- -2 is.PGP_Model(PGPM) is.valid.PGP_Model(PGPM) is.valid.PGP_Model(PGPM, comment = TRUE)
PGPM <- PGP_Model(2, 1000, 1, 2, dispersion = 2) PGPM is.valid.PGP_Model(PGPM) is.valid.PGP_Model(PGPM, comment = TRUE) PGPM$alpha_tail <- -2 is.PGP_Model(PGPM) is.valid.PGP_Model(PGPM) is.valid.PGP_Model(PGPM, comment = TRUE)
Checks if the class of an object is 'PPP_Model'
is.PPP_Model(x)
is.PPP_Model(x)
x |
Object to be checked. |
PPPM <- PPP_Model(2, c(1000,2000), c(1,2), dispersion = 2) PPPM is.valid.PPP_Model(PPPM) PPPM$alpha <- 2 is.valid.PPP_Model(PPPM) is.PPP_Model(PPPM)
PPPM <- PPP_Model(2, c(1000,2000), c(1,2), dispersion = 2) PPPM is.valid.PPP_Model(PPPM) PPPM$alpha <- 2 is.valid.PPP_Model(PPPM) is.PPP_Model(PPPM)
Checks if an object is a PGP_Model object and whether it is valid for the use in functions like Layer_Mean
is.valid.PGP_Model(x, comment = FALSE)
is.valid.PGP_Model(x, comment = FALSE)
x |
Object to be checked. |
comment |
If FALSE then the function returns a boolean indicating whether |
PGPM <- PGP_Model(2, 1000, 1, 2, dispersion = 2) PGPM is.valid.PGP_Model(PGPM) is.valid.PGP_Model(PGPM, comment = TRUE) PGPM$alpha_tail <- -2 is.valid.PGP_Model(PGPM) is.valid.PGP_Model(PGPM, comment = TRUE)
PGPM <- PGP_Model(2, 1000, 1, 2, dispersion = 2) PGPM is.valid.PGP_Model(PGPM) is.valid.PGP_Model(PGPM, comment = TRUE) PGPM$alpha_tail <- -2 is.valid.PGP_Model(PGPM) is.valid.PGP_Model(PGPM, comment = TRUE)
Checks if an object is a PPP_Model object and whether it is valid for the use in functions like Layer_Mean
is.valid.PPP_Model(x, comment = FALSE)
is.valid.PPP_Model(x, comment = FALSE)
x |
Object to be checked. |
comment |
If FALSE then the function returns a boolean indicating whether |
PPPM <- PPP_Model(2, c(1000,2000), c(1,2), dispersion = 2) PPPM is.valid.PPP_Model(PPPM) is.valid.PPP_Model(PPPM, comment = TRUE) PPPM$alpha <- 2 is.valid.PPP_Model(PPPM) is.valid.PPP_Model(PPPM, comment = TRUE)
PPPM <- PPP_Model(2, c(1000,2000), c(1,2), dispersion = 2) PPPM is.valid.PPP_Model(PPPM) is.valid.PPP_Model(PPPM, comment = TRUE) PPPM$alpha <- 2 is.valid.PPP_Model(PPPM) is.valid.PPP_Model(PPPM, comment = TRUE)
Calculates the expected loss of a reinsurance layer for a collective model
Layer_Mean(CollectiveModel, Cover = Inf, AttachmentPoint = 0)
Layer_Mean(CollectiveModel, Cover = Inf, AttachmentPoint = 0)
CollectiveModel |
A collective model object. Currently only |
Cover |
Numeric. Cover of the reinsurance layer. Use |
AttachmentPoint |
Numeric. Attachment point of the reinsurance layer. |
The expected loss of the layer Cover
xs AttachmentPoint
for the given CollectiveModel
PPPM <- PiecewisePareto_Match_Layer_Losses(Example1_AP, Example1_EL) PPPM Example1_Cov <- c(diff(Example1_AP), Inf) Example1_AP Example1_Cov Example1_EL Layer_Mean(PPPM, Example1_Cov, Example1_AP)
PPPM <- PiecewisePareto_Match_Layer_Losses(Example1_AP, Example1_EL) PPPM Example1_Cov <- c(diff(Example1_AP), Inf) Example1_AP Example1_Cov Example1_EL Layer_Mean(PPPM, Example1_Cov, Example1_AP)
Calculates the expected loss of a reinsurance layer for a PGP_Model
## S3 method for class 'PGP_Model' Layer_Mean(CollectiveModel, Cover = Inf, AttachmentPoint = 0)
## S3 method for class 'PGP_Model' Layer_Mean(CollectiveModel, Cover = Inf, AttachmentPoint = 0)
CollectiveModel |
PGP_Model object. |
Cover |
Numeric. Cover of the reinsurance layer. Use |
AttachmentPoint |
Numeric. Attachment point of the reinsurance layer. |
The expected loss of the layer Cover
xs AttachmentPoint
for the given CollectiveModel
PGPM <- PGP_Model(2, 1000, 1, 2, dispersion = 2) PGPM Example1_Cov <- c(diff(Example1_AP), Inf) Example1_AP Example1_Cov Example1_EL Layer_Mean(PGPM, Example1_Cov, Example1_AP)
PGPM <- PGP_Model(2, 1000, 1, 2, dispersion = 2) PGPM Example1_Cov <- c(diff(Example1_AP), Inf) Example1_AP Example1_Cov Example1_EL Layer_Mean(PGPM, Example1_Cov, Example1_AP)
Calculates the expected loss of a reinsurance layer for a PPP_Model
## S3 method for class 'PPP_Model' Layer_Mean(CollectiveModel, Cover = Inf, AttachmentPoint = 0)
## S3 method for class 'PPP_Model' Layer_Mean(CollectiveModel, Cover = Inf, AttachmentPoint = 0)
CollectiveModel |
PPP_Model object. |
Cover |
Numeric. Cover of the reinsurance layer. Use |
AttachmentPoint |
Numeric. Attachment point of the reinsurance layer. |
The expected loss of the layer Cover
xs AttachmentPoint
for the given CollectiveModel
PPPM <- PiecewisePareto_Match_Layer_Losses(Example1_AP, Example1_EL) PPPM Example1_Cov <- c(diff(Example1_AP), Inf) Example1_AP Example1_Cov Example1_EL Layer_Mean(PPPM, Example1_Cov, Example1_AP)
PPPM <- PiecewisePareto_Match_Layer_Losses(Example1_AP, Example1_EL) PPPM Example1_Cov <- c(diff(Example1_AP), Inf) Example1_AP Example1_Cov Example1_EL Layer_Mean(PPPM, Example1_Cov, Example1_AP)
Calculates the standard deviation of the loss in a reinsurance layer for a collective model
Layer_Sd(CollectiveModel, Cover = Inf, AttachmentPoint = 0)
Layer_Sd(CollectiveModel, Cover = Inf, AttachmentPoint = 0)
CollectiveModel |
A collective model object. Currently only |
Cover |
Numeric. Cover of the reinsurance layer. Use |
AttachmentPoint |
Numeric. Attachment point of the reinsurance layer. |
The standard deviation of the loss in the layer Cover
xs AttachmentPoint
for the given CollectiveModel
PPPM <- PiecewisePareto_Match_Layer_Losses(Example1_AP, Example1_EL) PPPM Example1_Cov <- c(diff(Example1_AP), Inf) Layer_Sd(PPPM, Example1_Cov, Example1_AP)
PPPM <- PiecewisePareto_Match_Layer_Losses(Example1_AP, Example1_EL) PPPM Example1_Cov <- c(diff(Example1_AP), Inf) Layer_Sd(PPPM, Example1_Cov, Example1_AP)
Calculates the standard deviation of the loss in a reinsurance layer for a PGP_model
## S3 method for class 'PGP_Model' Layer_Sd(CollectiveModel, Cover = Inf, AttachmentPoint = 0)
## S3 method for class 'PGP_Model' Layer_Sd(CollectiveModel, Cover = Inf, AttachmentPoint = 0)
CollectiveModel |
PGP_Model object. |
Cover |
Numeric. Cover of the reinsurance layer. Use |
AttachmentPoint |
Numeric. Attachment point of the reinsurance layer. |
The standard deviation of the loss in the layer Cover
xs AttachmentPoint
for the given CollectiveModel
PGPM <- PGP_Model(2, 1000, 1, 2, dispersion = 2) PGPM Example1_Cov <- c(diff(Example1_AP), Inf) Layer_Sd(PGPM, Example1_Cov, Example1_AP)
PGPM <- PGP_Model(2, 1000, 1, 2, dispersion = 2) PGPM Example1_Cov <- c(diff(Example1_AP), Inf) Layer_Sd(PGPM, Example1_Cov, Example1_AP)
Calculates the standard deviation of the loss in a reinsurance layer for a PPP_model
## S3 method for class 'PPP_Model' Layer_Sd(CollectiveModel, Cover = Inf, AttachmentPoint = 0)
## S3 method for class 'PPP_Model' Layer_Sd(CollectiveModel, Cover = Inf, AttachmentPoint = 0)
CollectiveModel |
PPP_Model object. |
Cover |
Numeric. Cover of the reinsurance layer. Use |
AttachmentPoint |
Numeric. Attachment point of the reinsurance layer. |
The standard deviation of the loss in the layer Cover
xs AttachmentPoint
for the given CollectiveModel
PPPM <- PiecewisePareto_Match_Layer_Losses(Example1_AP, Example1_EL) PPPM Example1_Cov <- c(diff(Example1_AP), Inf) Layer_Sd(PPPM, Example1_Cov, Example1_AP)
PPPM <- PiecewisePareto_Match_Layer_Losses(Example1_AP, Example1_EL) PPPM Example1_Cov <- c(diff(Example1_AP), Inf) Layer_Sd(PPPM, Example1_Cov, Example1_AP)
Calculates the variance of the loss in a reinsurance layer for a collective model
Layer_Var(CollectiveModel, Cover = Inf, AttachmentPoint = 0)
Layer_Var(CollectiveModel, Cover = Inf, AttachmentPoint = 0)
CollectiveModel |
A collective model object. Currently only |
Cover |
Numeric. Cover of the reinsurance layer. Use |
AttachmentPoint |
Numeric. Attachment point of the reinsurance layer. |
The variance of the loss in the layer Cover
xs AttachmentPoint
for the given CollectiveModel
PPPM <- PiecewisePareto_Match_Layer_Losses(Example1_AP, Example1_EL) PPPM Example1_Cov <- c(diff(Example1_AP), Inf) Layer_Var(PPPM, Example1_Cov, Example1_AP)
PPPM <- PiecewisePareto_Match_Layer_Losses(Example1_AP, Example1_EL) PPPM Example1_Cov <- c(diff(Example1_AP), Inf) Layer_Var(PPPM, Example1_Cov, Example1_AP)
Calculates the variance of the loss in a reinsurance layer for a PGP_model
## S3 method for class 'PGP_Model' Layer_Var(CollectiveModel, Cover = Inf, AttachmentPoint = 0)
## S3 method for class 'PGP_Model' Layer_Var(CollectiveModel, Cover = Inf, AttachmentPoint = 0)
CollectiveModel |
PGP_Model object. |
Cover |
Numeric. Cover of the reinsurance layer. Use |
AttachmentPoint |
Numeric. Attachment point of the reinsurance layer. |
The variance of the loss in the layer Cover
xs AttachmentPoint
for the given CollectiveModel
PGPM <- PGP_Model(2, 1000, 1, 2, dispersion = 2) PGPM Example1_Cov <- c(diff(Example1_AP), Inf) Layer_Var(PGPM, Example1_Cov, Example1_AP)
PGPM <- PGP_Model(2, 1000, 1, 2, dispersion = 2) PGPM Example1_Cov <- c(diff(Example1_AP), Inf) Layer_Var(PGPM, Example1_Cov, Example1_AP)
Calculates the variance of the loss in a reinsurance layer for a PPP_model
## S3 method for class 'PPP_Model' Layer_Var(CollectiveModel, Cover = Inf, AttachmentPoint = 0)
## S3 method for class 'PPP_Model' Layer_Var(CollectiveModel, Cover = Inf, AttachmentPoint = 0)
CollectiveModel |
PPP_Model object. |
Cover |
Numeric. Cover of the reinsurance layer. Use |
AttachmentPoint |
Numeric. Attachment point of the reinsurance layer. |
The variance of the loss in the layer Cover
xs AttachmentPoint
for the given CollectiveModel
PPPM <- PiecewisePareto_Match_Layer_Losses(Example1_AP, Example1_EL) PPPM Example1_Cov <- c(diff(Example1_AP), Inf) Layer_Var(PPPM, Example1_Cov, Example1_AP)
PPPM <- PiecewisePareto_Match_Layer_Losses(Example1_AP, Example1_EL) PPPM Example1_Cov <- c(diff(Example1_AP), Inf) Layer_Var(PPPM, Example1_Cov, Example1_AP)
Calculates the local Pareto alpha of the normal, lognormal and gamma distribution
Local_Pareto_Alpha(x, distribution, ...)
Local_Pareto_Alpha(x, distribution, ...)
x |
Numeric. Vector of thresholds at which the local Pareto alpha is calculated. |
distribution |
Character.
|
... |
Arguments for the selected distribution |
Local Pareto alpha of the selected distribution at x
Riegel, U. (2008) Generalizations of common ILF models. Blaetter der DGVFM 29: 45–71
x <- 1:10 * 1e6 Local_Pareto_Alpha(x, "norm", mean = 5e6, sd = 2e6) Local_Pareto_Alpha(x, "lnorm", meanlog = 0, sdlog = 4) Local_Pareto_Alpha(x, "gamma", shape = 5, rate = 1e-6) Local_Pareto_Alpha(x, "weibull", shape = 0.5, scale = 1e6) Local_Pareto_Alpha(x, "exp", rate = 1e-6) Local_Pareto_Alpha(x, "Pareto", t = 1e6, alpha = 1, truncation = 20e6) Local_Pareto_Alpha(x, "GenPareto", t = 1e6, alpha_ini = 1, alpha_tail = 2) Local_Pareto_Alpha(x, "PiecewisePareto", t = c(1e6, 3e6, 5e6), alpha = c(1, 2, 3), truncation = 20e6, truncation_type = "wd")
x <- 1:10 * 1e6 Local_Pareto_Alpha(x, "norm", mean = 5e6, sd = 2e6) Local_Pareto_Alpha(x, "lnorm", meanlog = 0, sdlog = 4) Local_Pareto_Alpha(x, "gamma", shape = 5, rate = 1e-6) Local_Pareto_Alpha(x, "weibull", shape = 0.5, scale = 1e6) Local_Pareto_Alpha(x, "exp", rate = 1e-6) Local_Pareto_Alpha(x, "Pareto", t = 1e6, alpha = 1, truncation = 20e6) Local_Pareto_Alpha(x, "GenPareto", t = 1e6, alpha_ini = 1, alpha_tail = 2) Local_Pareto_Alpha(x, "PiecewisePareto", t = c(1e6, 3e6, 5e6), alpha = c(1, 2, 3), truncation = 20e6, truncation_type = "wd")
Calculates the cumulative distribution function of a Pareto distribution. This function is deprecated. Use pPareto
instead.
Pareto_CDF(x, t, alpha, truncation = NULL)
Pareto_CDF(x, t, alpha, truncation = NULL)
x |
Numeric. The function evaluates the CDF at |
t |
Numeric. Threshold of the Pareto distribution. |
alpha |
Numeric. Pareto alpha. |
truncation |
Numeric. If |
Distribution function of the Pareto distribution with parameters t
and alpha
evaluated at x
x <- 0:10 * 1000 pPareto(x, 1000, 2) pPareto(x, 1000, 2, truncation = 5000)
x <- 0:10 * 1000 pPareto(x, 1000, 2) pPareto(x, 1000, 2, truncation = 5000)
Uses a Pareto distribution to derive the expected loss of a layer from the expected loss of another layer
Pareto_Extrapolation( Cover_1, AttachmentPoint_1, Cover_2, AttachmentPoint_2, alpha, ExpLoss_1 = NULL, truncation = NULL )
Pareto_Extrapolation( Cover_1, AttachmentPoint_1, Cover_2, AttachmentPoint_2, alpha, ExpLoss_1 = NULL, truncation = NULL )
Cover_1 |
Numeric. Cover of the layer from which we extrapolate. Use |
AttachmentPoint_1 |
Numeric. Attachment point of the layer from which we extrapolate. |
Cover_2 |
Numeric. Cover of the layer to which we extrapolate. Use |
AttachmentPoint_2 |
Numeric. Attachment point of the layer to which we extrapolate. |
alpha |
Numeric. Pareto alpha used for the extrapolation. |
ExpLoss_1 |
Numeric. Expected loss of the layer from which we extrapolate. If |
truncation |
Numeric. If |
The expected loss of the layer Cover_2
xs AttachmentPoint_2
given that Cover_1
xs AttachmentPoint_1
has expected
loss ExpLoss_1
and assuming a (truncated) Pareto distribution with parameters t
and alpha
. If missing then ExpLoss_1 == 1
is assumed.
Riegel, U. (2018) Matching tower information with piecewise Pareto. European Actuarial Journal 8(2): 437–460
Pareto_Extrapolation(1000, 1000, 2000, 2000, 2, ExpLoss_1 = 100) Pareto_Extrapolation(1000, 1000, 2000, 2000, 2) * 100 Pareto_Extrapolation(1000, 1000, 2000, 2000, 2, truncation = 5000, ExpLoss_1 = 100) Pareto_Extrapolation(1000, 1000, 2000, 2000, 2, truncation = 5000) * 100
Pareto_Extrapolation(1000, 1000, 2000, 2000, 2, ExpLoss_1 = 100) Pareto_Extrapolation(1000, 1000, 2000, 2000, 2) * 100 Pareto_Extrapolation(1000, 1000, 2000, 2000, 2, truncation = 5000, ExpLoss_1 = 100) Pareto_Extrapolation(1000, 1000, 2000, 2000, 2, truncation = 5000) * 100
Finds the Pareto alpha between an excess frequency and the expected loss of a layer
Pareto_Find_Alpha_btw_FQ_Layer( Threshold, Frequency, Cover, AttachmentPoint, ExpLoss, max_alpha = 100, tolerance = 1e-10, truncation = NULL )
Pareto_Find_Alpha_btw_FQ_Layer( Threshold, Frequency, Cover, AttachmentPoint, ExpLoss, max_alpha = 100, tolerance = 1e-10, truncation = NULL )
Threshold |
Numeric. Threshold |
Frequency |
Numeric. Expected frequency in excess of |
Cover |
Numeric. Cover of the second layer. |
AttachmentPoint |
Numeric. Attachment point of the layer. |
ExpLoss |
Numeric. Expected loss of the layer. |
max_alpha |
Numeric. Upper limit for the alpha that is returned. |
tolerance |
Numeric. Accuracy of the result. |
truncation |
Numeric. If |
The Pareto alpha between the expected number of claims Frequency
excess Threshold
and the layer Cover
xs AttachmentPoint
with expected loss ExpLoss
Riegel, U. (2018) Matching tower information with piecewise Pareto. European Actuarial Journal 8(2): 437–460
Pareto_Find_Alpha_btw_FQ_Layer(1000, 1, 1000, 1000, 500) Pareto_Find_Alpha_btw_FQ_Layer(1000, 1, 1000, 1000, 500, truncation = 5000)
Pareto_Find_Alpha_btw_FQ_Layer(1000, 1, 1000, 1000, 500) Pareto_Find_Alpha_btw_FQ_Layer(1000, 1, 1000, 1000, 500, truncation = 5000)
Finds the Pareto alpha between two excess frequencies
Pareto_Find_Alpha_btw_FQs( Threshold_1, Frequency_1, Threshold_2, Frequency_2, max_alpha = 100, tolerance = 1e-10, truncation = NULL )
Pareto_Find_Alpha_btw_FQs( Threshold_1, Frequency_1, Threshold_2, Frequency_2, max_alpha = 100, tolerance = 1e-10, truncation = NULL )
Threshold_1 |
Numeric. Threshold 1 |
Frequency_1 |
Numeric. Expected frequency in excess of |
Threshold_2 |
Numeric. Threshold 2 |
Frequency_2 |
Numeric. Expected frequency in excess of |
max_alpha |
Numeric. Upper limit for the alpha that is returned. |
tolerance |
Numeric. Accuracy of the result. |
truncation |
Numeric. If |
The Pareto alpha between the expected number of claims Frequency_1
excess Threshold_1
and the expected number of claims Frequency_2
excess Threshold_2
Riegel, U. (2018) Matching tower information with piecewise Pareto. European Actuarial Journal 8(2): 437–460
Pareto_Find_Alpha_btw_FQs(1000, 1, 2000, 0.5) Pareto_Find_Alpha_btw_FQs(1000, 1, 2000, 0.5, truncation = 5000)
Pareto_Find_Alpha_btw_FQs(1000, 1, 2000, 0.5) Pareto_Find_Alpha_btw_FQs(1000, 1, 2000, 0.5, truncation = 5000)
Finds the Pareto alpha between two layers
Pareto_Find_Alpha_btw_Layers( Cover_1, AttachmentPoint_1, ExpLoss_1, Cover_2, AttachmentPoint_2, ExpLoss_2, max_alpha = 100, tolerance = 1e-10, truncation = NULL )
Pareto_Find_Alpha_btw_Layers( Cover_1, AttachmentPoint_1, ExpLoss_1, Cover_2, AttachmentPoint_2, ExpLoss_2, max_alpha = 100, tolerance = 1e-10, truncation = NULL )
Cover_1 |
Numeric. Cover of the first layer. |
AttachmentPoint_1 |
Numeric. Attachment point of the first layer. |
ExpLoss_1 |
Numeric. Expected loss of the first layer. |
Cover_2 |
Numeric. Cover of the second layer. |
AttachmentPoint_2 |
Numeric. Attachment point of the second layer. |
ExpLoss_2 |
Numeric. Expected loss of the second layer. |
max_alpha |
Numeric. Upper limit for the alpha that is returned. |
tolerance |
Numeric. Accuracy of the result. |
truncation |
Numeric. If |
The Pareto alpha between the layer Cover_1
xs AttachmentPoint_1
with expected loss ExpLoss_1
and the layer Cover_2
xs AttachmentPoint_2
with expected loss ExpLoss_2
Riegel, U. (2018) Matching tower information with piecewise Pareto. European Actuarial Journal 8(2): 437–460
Pareto_Find_Alpha_btw_Layers(100, 100, 100, 200, 200, 50) Pareto_Find_Alpha_btw_Layers(100, 100, 100, 200, 200, 50, truncation = 500)
Pareto_Find_Alpha_btw_Layers(100, 100, 100, 200, 200, 50) Pareto_Find_Alpha_btw_Layers(100, 100, 100, 200, 200, 50, truncation = 500)
Calculates the expected loss of a Pareto distribution in a reinsurance layer
Pareto_Layer_Mean(Cover, AttachmentPoint, alpha, t = NULL, truncation = NULL)
Pareto_Layer_Mean(Cover, AttachmentPoint, alpha, t = NULL, truncation = NULL)
Cover |
Numeric. Cover of the reinsurance layer. Use |
AttachmentPoint |
Numeric. Attachment point of the reinsurance layer. |
alpha |
Numeric. Pareto alpha. |
t |
Numeric. Threshold of the Pareto distribution. If |
truncation |
Numeric. If |
The expected loss of the (truncated) Pareto distribution with parameters t
and alpha
in the layer
Cover
xs AttachmentPoint
Pareto_Layer_Mean(4000, 1000, 2) Pareto_Layer_Mean(4000, 1000, alpha = 2, t = 1000) Pareto_Layer_Mean(4000, 1000, alpha = 2, t = 5000) Pareto_Layer_Mean(4000, 1000, alpha = 2, t = 1000, truncation = 5000) Pareto_Layer_Mean(9000, 1000, alpha = 2, t = 1000, truncation = 5000)
Pareto_Layer_Mean(4000, 1000, 2) Pareto_Layer_Mean(4000, 1000, alpha = 2, t = 1000) Pareto_Layer_Mean(4000, 1000, alpha = 2, t = 5000) Pareto_Layer_Mean(4000, 1000, alpha = 2, t = 1000, truncation = 5000) Pareto_Layer_Mean(9000, 1000, alpha = 2, t = 1000, truncation = 5000)
Calculates the second moment of a Pareto distribution in a reinsurance layer
Pareto_Layer_SM(Cover, AttachmentPoint, alpha, t = NULL, truncation = NULL)
Pareto_Layer_SM(Cover, AttachmentPoint, alpha, t = NULL, truncation = NULL)
Cover |
Numeric. Cover of the reinsurance layer. Use |
AttachmentPoint |
Numeric. Attachment point of the reinsurance layer. |
alpha |
Numeric. Pareto alpha. |
t |
Numeric. Threshold of the Pareto distribution. If |
truncation |
Numeric. If |
The second moment of the (truncated) Pareto distribution with parameters t
and alpha
in the layer
Cover
xs AttachmentPoint
Pareto_Layer_SM(4000, 1000, 2) Pareto_Layer_SM(4000, 1000, alpha = 2, t = 1000) Pareto_Layer_SM(4000, 1000, alpha = 2, t = 5000) Pareto_Layer_SM(4000, 1000, alpha = 2, t = 1000, truncation = 5000) Pareto_Layer_SM(9000, 1000, alpha = 2, t = 1000, truncation = 5000)
Pareto_Layer_SM(4000, 1000, 2) Pareto_Layer_SM(4000, 1000, alpha = 2, t = 1000) Pareto_Layer_SM(4000, 1000, alpha = 2, t = 5000) Pareto_Layer_SM(4000, 1000, alpha = 2, t = 1000, truncation = 5000) Pareto_Layer_SM(9000, 1000, alpha = 2, t = 1000, truncation = 5000)
Calculates the variance of a Pareto distribution in a reinsurance layer
Pareto_Layer_Var(Cover, AttachmentPoint, alpha, t = NULL, truncation = NULL)
Pareto_Layer_Var(Cover, AttachmentPoint, alpha, t = NULL, truncation = NULL)
Cover |
Numeric. Cover of the reinsurance layer. Use |
AttachmentPoint |
Numeric. Attachment point of the reinsurance layer. |
alpha |
Numeric. Pareto alpha. |
t |
Numeric. Threshold of the Pareto distribution. If |
truncation |
Numeric. If |
The variance of the(truncated) Pareto distribution with parameters t
and alpha
in the layer
Cover
xs AttachmentPoint
Pareto_Layer_Var(4000, 1000, 2) Pareto_Layer_Var(4000, 1000, alpha = 2, t = 1000) Pareto_Layer_Var(4000, 1000, alpha = 2, t = 5000) Pareto_Layer_Var(4000, 1000, alpha = 2, t = 1000, truncation = 5000) Pareto_Layer_Var(9000, 1000, alpha = 2, t = 1000, truncation = 5000)
Pareto_Layer_Var(4000, 1000, 2) Pareto_Layer_Var(4000, 1000, alpha = 2, t = 1000) Pareto_Layer_Var(4000, 1000, alpha = 2, t = 5000) Pareto_Layer_Var(4000, 1000, alpha = 2, t = 1000, truncation = 5000) Pareto_Layer_Var(9000, 1000, alpha = 2, t = 1000, truncation = 5000)
Calculates the maximum likelihood estimator for the parameter alpha of a Pareto distribution with a known threshold and (if applicable) a known truncation
Pareto_ML_Estimator_Alpha( losses, t, truncation = NULL, reporting_thresholds = NULL, is.censored = NULL, weights = NULL, alpha_min = 0.001, alpha_max = 10 )
Pareto_ML_Estimator_Alpha( losses, t, truncation = NULL, reporting_thresholds = NULL, is.censored = NULL, weights = NULL, alpha_min = 0.001, alpha_max = 10 )
losses |
Numeric vector. Losses that are used for the ML estimation. |
t |
Numeric. Threshold of the Pareto distribution. |
truncation |
Numeric. If |
reporting_thresholds |
Numeric vector. Allows to enter loss specific reporting thresholds. If |
is.censored |
Logical vector. |
weights |
Numeric vector. Weights for the losses. For instance |
alpha_min |
Numeric. Lower bound for alpha (only used in truncated case). |
alpha_max |
Numeric. Upper bound for alpha (only used in truncated case). |
Maximum likelihood estimator for the parameter alpha
of a Pareto distribution with threshold t
given the observations losses
losses <- rPareto(100, 1000, 2) Pareto_ML_Estimator_Alpha(losses, 1000) losses <- rPareto(100, 1000, 2, truncation = 2000) Pareto_ML_Estimator_Alpha(losses, 1000) Pareto_ML_Estimator_Alpha(losses, 1000, truncation = 2000) t <- 100 alpha <- 2 losses <- rPareto(10000, t, alpha) reporting_thresholds <- rPareto(10000, t, 5) index <- losses > reporting_thresholds losses <- losses[index] reporting_thresholds <- reporting_thresholds[index] Pareto_ML_Estimator_Alpha(losses, t) Pareto_ML_Estimator_Alpha(losses, t, reporting_thresholds = reporting_thresholds) losses <- rPareto(10, 1000, 2) w <- rep(1, 10) w[1] <- 3 losses2 <- c(losses, losses[1], losses[1]) Pareto_ML_Estimator_Alpha(losses, 1000, weights = w) Pareto_ML_Estimator_Alpha(losses2, 1000)
losses <- rPareto(100, 1000, 2) Pareto_ML_Estimator_Alpha(losses, 1000) losses <- rPareto(100, 1000, 2, truncation = 2000) Pareto_ML_Estimator_Alpha(losses, 1000) Pareto_ML_Estimator_Alpha(losses, 1000, truncation = 2000) t <- 100 alpha <- 2 losses <- rPareto(10000, t, alpha) reporting_thresholds <- rPareto(10000, t, 5) index <- losses > reporting_thresholds losses <- losses[index] reporting_thresholds <- reporting_thresholds[index] Pareto_ML_Estimator_Alpha(losses, t) Pareto_ML_Estimator_Alpha(losses, t, reporting_thresholds = reporting_thresholds) losses <- rPareto(10, 1000, 2) w <- rep(1, 10) w[1] <- 3 losses2 <- c(losses, losses[1], losses[1]) Pareto_ML_Estimator_Alpha(losses, 1000, weights = w) Pareto_ML_Estimator_Alpha(losses2, 1000)
Calculates the density function of the Pareto distribution. This function is deprecated. Use dPareto
instead.
Pareto_PDF(x, t, alpha, truncation = NULL)
Pareto_PDF(x, t, alpha, truncation = NULL)
x |
Numeric. The function evaluates the density at |
t |
Numeric. Threshold of the Pareto distribution. |
alpha |
Numeric. Pareto alpha. |
truncation |
Numeric. If |
Density function of the Pareto distribution with parameters t
and alpha
evaluated at x
x <- 0:10 * 1000 dPareto(x, 1000, 2) dPareto(x, 1000, 2, truncation = 5000)
x <- 0:10 * 1000 dPareto(x, 1000, 2) dPareto(x, 1000, 2, truncation = 5000)
Calculates the cumulative distribution function of a generalized Pareto distribution
pGenPareto(x, t, alpha_ini, alpha_tail, truncation = NULL)
pGenPareto(x, t, alpha_ini, alpha_tail, truncation = NULL)
x |
Numeric. The function evaluates the CDF at |
t |
Numeric. Threshold of the generalized Pareto distribution. |
alpha_ini |
Numeric. Initial Pareto alpha. |
alpha_tail |
Numeric. Tail Pareto alpha. |
truncation |
Numeric. If |
Distribution function of the generalized Pareto distribution with parameters t
, alpha_ini
and alpha_tail
evaluated at x
x <- 0:10 * 1000 pGenPareto(x, 1000, 1, 3) pGenPareto(x, 1000, 1, 3, truncation = 5000)
x <- 0:10 * 1000 pGenPareto(x, 1000, 1, 3) pGenPareto(x, 1000, 1, 3, truncation = 5000)
Constructor function for the PGP_Model object
PGP_Model( FQ = NULL, t = NULL, alpha_ini = NULL, alpha_tail = NULL, truncation = NULL, dispersion = 1, Status = 0, Comment = "OK" )
PGP_Model( FQ = NULL, t = NULL, alpha_ini = NULL, alpha_tail = NULL, truncation = NULL, dispersion = 1, Status = 0, Comment = "OK" )
FQ |
Numerical. Expected claim count of the collective model. |
t |
Numeric. Threshold of the Pareto distribution. If |
alpha_ini |
Numeric. Initial Pareto alpha (at |
alpha_tail |
Numeric. Tail Pareto alpha. |
truncation |
Numeric. If |
dispersion |
Numerical. Dispersion of the Panjer distribution (i.e. variance to mean ratio). |
Status |
Numerical indicator if a function returns a PGP_Model object: 0 = success, 1 = some information has been ignored, 2 = no solution found |
Comment |
Charakter. An optional comment. |
PGPM <- PGP_Model(2, t = 1000, alpha_ini = 1, alpha_tail = 2 , dispersion = 2) PGPM
PGPM <- PGP_Model(2, t = 1000, alpha_ini = 1, alpha_tail = 2 , dispersion = 2) PGPM
Calculates the cumulative distribution function of a Piecewise Pareto Distribution. This function is deprecated. Use pPiecewisePareto
instead.
PiecewisePareto_CDF(x, t, alpha, truncation = NULL, truncation_type = "lp")
PiecewisePareto_CDF(x, t, alpha, truncation = NULL, truncation_type = "lp")
x |
Numeric. The function evaluates the CDF at |
t |
Numeric vector. Thresholds of the piecewise Pareto distribution. |
alpha |
Numeric vector. |
truncation |
Numeric. If |
truncation_type |
Character. If |
Distribution function of the piecewise Pareto distribution with parameter vectors t
and alpha
evaluated at x
Riegel, U. (2018) Matching tower information with piecewise Pareto. European Actuarial Journal 8(2): 437–460
t <- c(1000, 2000, 3000) alpha <- c(1, 1.5, 2) x <- 0:10 * 1000 pPiecewisePareto(x, t, alpha) pPiecewisePareto(x, t, alpha, truncation = 5000, truncation_type = "lp") pPiecewisePareto(x, t, alpha, truncation = 5000, truncation_type = "wd")
t <- c(1000, 2000, 3000) alpha <- c(1, 1.5, 2) x <- 0:10 * 1000 pPiecewisePareto(x, t, alpha) pPiecewisePareto(x, t, alpha, truncation = 5000, truncation_type = "lp") pPiecewisePareto(x, t, alpha, truncation = 5000, truncation_type = "wd")
Calculates the expected loss of a piecewise Pareto distribution in a reinsurance layer
PiecewisePareto_Layer_Mean( Cover, AttachmentPoint, t, alpha, truncation = NULL, truncation_type = "lp" )
PiecewisePareto_Layer_Mean( Cover, AttachmentPoint, t, alpha, truncation = NULL, truncation_type = "lp" )
Cover |
Numeric. Cover of the reinsurance layer. |
AttachmentPoint |
Numeric. Attachment point of the reinsurance layer. |
t |
Numeric vector. Thresholds of the piecewise Pareto distribution. |
alpha |
Numeric vector. |
truncation |
Numeric. If |
truncation_type |
Character. If |
The expected loss of the (truncated) piecewise Pareto distribution with parameter vectors t
and alpha
in the layer
Cover
xs AttachmentPoint
Riegel, U. (2018) Matching tower information with piecewise Pareto. European Actuarial Journal 8(2): 437–460
t <- c(1000, 2000, 3000) alpha <- c(1, 1.5, 2) PiecewisePareto_Layer_Mean(4000, 1000, t, alpha) PiecewisePareto_Layer_Mean(4000, 1000, t, alpha, truncation = 5000) PiecewisePareto_Layer_Mean(4000, 1000, t, alpha, truncation = 5000, truncation_type = "lp") PiecewisePareto_Layer_Mean(4000, 1000, t, alpha, truncation = 5000, truncation_type = "wd")
t <- c(1000, 2000, 3000) alpha <- c(1, 1.5, 2) PiecewisePareto_Layer_Mean(4000, 1000, t, alpha) PiecewisePareto_Layer_Mean(4000, 1000, t, alpha, truncation = 5000) PiecewisePareto_Layer_Mean(4000, 1000, t, alpha, truncation = 5000, truncation_type = "lp") PiecewisePareto_Layer_Mean(4000, 1000, t, alpha, truncation = 5000, truncation_type = "wd")
Calculates the second moment of a piecewise Pareto distribution in a reinsurance layer
PiecewisePareto_Layer_SM( Cover, AttachmentPoint, t, alpha, truncation = NULL, truncation_type = "lp" )
PiecewisePareto_Layer_SM( Cover, AttachmentPoint, t, alpha, truncation = NULL, truncation_type = "lp" )
Cover |
Numeric. Cover of the reinsurance layer. |
AttachmentPoint |
Numeric. Attachment point of the reinsurance layer. |
t |
Numeric vector. Thresholds of the piecewise Pareto distribution. |
alpha |
Numeric vector. |
truncation |
Numeric. If |
truncation_type |
Character. If |
The second moment of the (truncated) piecewise Pareto distribution with parameter vectors t
and alpha
in the layer
Cover
xs AttachmentPoint
t <- c(1000, 2000, 3000) alpha <- c(1, 1.5, 2) PiecewisePareto_Layer_SM(4000, 1000, t, alpha) PiecewisePareto_Layer_SM(4000, 1000, t, alpha, truncation = 5000) PiecewisePareto_Layer_SM(4000, 1000, t, alpha, truncation = 5000, truncation_type = "lp") PiecewisePareto_Layer_SM(4000, 1000, t, alpha, truncation = 5000, truncation_type = "wd")
t <- c(1000, 2000, 3000) alpha <- c(1, 1.5, 2) PiecewisePareto_Layer_SM(4000, 1000, t, alpha) PiecewisePareto_Layer_SM(4000, 1000, t, alpha, truncation = 5000) PiecewisePareto_Layer_SM(4000, 1000, t, alpha, truncation = 5000, truncation_type = "lp") PiecewisePareto_Layer_SM(4000, 1000, t, alpha, truncation = 5000, truncation_type = "wd")
Calculate the variance of a piecewise Pareto distribution in a reinsurance layer
PiecewisePareto_Layer_Var( Cover, AttachmentPoint, t, alpha, truncation = NULL, truncation_type = "lp" )
PiecewisePareto_Layer_Var( Cover, AttachmentPoint, t, alpha, truncation = NULL, truncation_type = "lp" )
Cover |
Numeric. Cover of the reinsurance layer. |
AttachmentPoint |
Numeric. Attachment point of the reinsurance layer. |
t |
Numeric vector. Thresholds of the piecewise Pareto distribution. |
alpha |
Numeric vector. |
truncation |
Numeric. If |
truncation_type |
Character. If |
The variance of the (truncated) piecewise Pareto distribution with parameter vectors t
and alpha
in the layer
Cover
xs AttachmentPoint
t <- c(1000, 2000, 3000) alpha <- c(1, 1.5, 2) PiecewisePareto_Layer_Var(4000, 1000, t, alpha) PiecewisePareto_Layer_SM(4000, 1000, t, alpha) - PiecewisePareto_Layer_Mean(4000, 1000, t, alpha)^2 PiecewisePareto_Layer_Var(4000, 1000, t, alpha, truncation = 5000) PiecewisePareto_Layer_Var(4000, 1000, t, alpha, truncation = 5000, truncation_type = "lp") PiecewisePareto_Layer_Var(4000, 1000, t, alpha, truncation = 5000, truncation_type = "wd")
t <- c(1000, 2000, 3000) alpha <- c(1, 1.5, 2) PiecewisePareto_Layer_Var(4000, 1000, t, alpha) PiecewisePareto_Layer_SM(4000, 1000, t, alpha) - PiecewisePareto_Layer_Mean(4000, 1000, t, alpha)^2 PiecewisePareto_Layer_Var(4000, 1000, t, alpha, truncation = 5000) PiecewisePareto_Layer_Var(4000, 1000, t, alpha, truncation = 5000, truncation_type = "lp") PiecewisePareto_Layer_Var(4000, 1000, t, alpha, truncation = 5000, truncation_type = "wd")
Matches the expected losses of a tower of reinsurance layers using a piecewise Pareto severity
PiecewisePareto_Match_Layer_Losses( Attachment_Points, Expected_Layer_Losses, Unlimited_Layers = FALSE, Frequencies = NULL, FQ_at_lowest_AttPt = NULL, FQ_at_highest_AttPt = NULL, TotalLoss_Frequencies = NULL, minimize_ratios = TRUE, Use_unlimited_Layer_for_FQ = TRUE, truncation = NULL, truncation_type = "lp", dispersion = 1, tolerance = 1e-10, alpha_max = 100, merge_tolerance = 1e-06, RoL_tolerance = 1e-06 )
PiecewisePareto_Match_Layer_Losses( Attachment_Points, Expected_Layer_Losses, Unlimited_Layers = FALSE, Frequencies = NULL, FQ_at_lowest_AttPt = NULL, FQ_at_highest_AttPt = NULL, TotalLoss_Frequencies = NULL, minimize_ratios = TRUE, Use_unlimited_Layer_for_FQ = TRUE, truncation = NULL, truncation_type = "lp", dispersion = 1, tolerance = 1e-10, alpha_max = 100, merge_tolerance = 1e-06, RoL_tolerance = 1e-06 )
Attachment_Points |
Numeric vector. Vector containing the attachment points of consecutive layers in increasing order |
Expected_Layer_Losses |
Numeric vector. Vector containing the expected losses of layers xs the attachment points. |
Unlimited_Layers |
Logical. If |
Frequencies |
Numeric vector. Expected frequencies excess the attachment points. The vector may contain NAs. If |
FQ_at_lowest_AttPt |
Numerical. Expected frequency excess |
FQ_at_highest_AttPt |
Numerical. Expected frequency excess |
TotalLoss_Frequencies |
Numeric vector. |
minimize_ratios |
Logical. If |
Use_unlimited_Layer_for_FQ |
Logical. Only relevant if no frequency is provided for the highest attachment point by the user. If |
truncation |
Numeric. If |
truncation_type |
Character. If |
dispersion |
Numerical. Dispersion of the claim count distribution in the resulting PPP_Model. |
tolerance |
Numeric. Numerical tolerance. |
alpha_max |
Numerical. Maximum alpha to be used for the matching. |
merge_tolerance |
Numerical. Consecutive Pareto pieces are merged if the alphas deviate by less than merge_tolerance. |
RoL_tolerance |
Numerical. Consecutive layers are merged if RoL decreases less than factor |
A PPP_Model object that contains the information about a collective model with a Panjer distributed claim count and a Piecewise Pareto distributed severity. The object contains the following elements:
FQ
Numerical. Frequency in excess of the lowest threshold of the piecewise Pareto distribution
t
Numeric vector. Vector containing the thresholds for the piecewise Pareto distribution
alpha
Numeric vector. Vector containing the Pareto alphas of the piecewise Pareto distribution
truncation
Numerical. If truncation
is not NULL
and truncation > max(t)
, then the distribution is truncated at truncation
.
truncation_type
Character. If truncation_type = "wd"
then the whole distribution is truncated. If truncation_type = "lp"
then a truncated Pareto is used for the last piece.
dispersion
Numerical. Dispersion of the Panjer distribution (i.e. variance to mean ratio).
Status
Numerical indicator: 0 = success, 1 = some information has been ignored, 2 = no solution found
Comment
Character. Information on whether the fit was successful
Riegel, U. (2018) Matching tower information with piecewise Pareto. European Actuarial Journal 8(2): 437–460
AP <- Example1_AP EL <- Example1_EL PiecewisePareto_Match_Layer_Losses(AP, EL) EL_unlimited <- rev(cumsum(rev(Example1_EL))) PiecewisePareto_Match_Layer_Losses(AP, EL_unlimited, Unlimited_Layers = TRUE) PiecewisePareto_Match_Layer_Losses(AP, EL, FQ_at_lowest_AttPt = 0.5) Example1_FQ <- c(0.3, 0.15, 0.08, 0.02, 0.005) PiecewisePareto_Match_Layer_Losses(AP, EL, Frequencies = Example1_FQ)
AP <- Example1_AP EL <- Example1_EL PiecewisePareto_Match_Layer_Losses(AP, EL) EL_unlimited <- rev(cumsum(rev(Example1_EL))) PiecewisePareto_Match_Layer_Losses(AP, EL_unlimited, Unlimited_Layers = TRUE) PiecewisePareto_Match_Layer_Losses(AP, EL, FQ_at_lowest_AttPt = 0.5) Example1_FQ <- c(0.3, 0.15, 0.08, 0.02, 0.005) PiecewisePareto_Match_Layer_Losses(AP, EL, Frequencies = Example1_FQ)
Calculates the maximum likelihood estimator of the parameter vector alpha for a a piecewise Pareto distribution with given vector t and (if applicable) a known truncation
PiecewisePareto_ML_Estimator_Alpha( losses, t, truncation = NULL, truncation_type = "lp", reporting_thresholds = NULL, is.censored = NULL, weights = NULL, alpha_min = 0.001, alpha_max = 10 )
PiecewisePareto_ML_Estimator_Alpha( losses, t, truncation = NULL, truncation_type = "lp", reporting_thresholds = NULL, is.censored = NULL, weights = NULL, alpha_min = 0.001, alpha_max = 10 )
losses |
Numeric vector. Losses that are used for the ML estimation. |
t |
Numeric vector. Thresholds of the piecewise Pareto distribution. |
truncation |
Numeric. If |
truncation_type |
Character. If |
reporting_thresholds |
Numeric vector. Allows to enter loss specific reporting thresholds. If |
is.censored |
Logical vector. |
weights |
Numeric vector. Weights for the losses. For instance |
alpha_min |
Numeric. Lower bound for the estimated alphas (only used in truncated case). |
alpha_max |
Numeric. Upper bound for the estimated alphas (only used in truncated case). |
Maximum likelihood estimator for the parameter alpha
of a Pareto distribution with threshold t
given the observations losses
losses <- rPiecewisePareto(10000, t = c(100,200,300), alpha = c(1,2,3)) PiecewisePareto_ML_Estimator_Alpha(losses, c(100,200,300)) losses <- rPiecewisePareto(10000, t = c(100,200,300), alpha = c(1,2,3), truncation = 500, truncation_type = "wd") PiecewisePareto_ML_Estimator_Alpha(losses, c(100,200,300)) PiecewisePareto_ML_Estimator_Alpha(losses, c(100,200,300), truncation = 500, truncation_type = "wd") reporting_thresholds <- rPareto(10000, 100, 3) index <- losses > reporting_thresholds losses <- losses[index] reporting_thresholds <- reporting_thresholds[index] PiecewisePareto_ML_Estimator_Alpha(losses, c(100,200,300), truncation = 500, truncation_type = "wd") PiecewisePareto_ML_Estimator_Alpha(losses, c(100,200,300), truncation = 500, truncation_type = "wd", reporting_thresholds = reporting_thresholds) losses <- c(140, 240, 490, 200, 110, 710, 120, 190, 210, 310) w <- rep(1, length(losses)) w[1] <- 2 losses2 <- c(losses, losses[1]) PiecewisePareto_ML_Estimator_Alpha(losses, c(100,200,300), weights = w) PiecewisePareto_ML_Estimator_Alpha(losses2, c(100,200,300))
losses <- rPiecewisePareto(10000, t = c(100,200,300), alpha = c(1,2,3)) PiecewisePareto_ML_Estimator_Alpha(losses, c(100,200,300)) losses <- rPiecewisePareto(10000, t = c(100,200,300), alpha = c(1,2,3), truncation = 500, truncation_type = "wd") PiecewisePareto_ML_Estimator_Alpha(losses, c(100,200,300)) PiecewisePareto_ML_Estimator_Alpha(losses, c(100,200,300), truncation = 500, truncation_type = "wd") reporting_thresholds <- rPareto(10000, 100, 3) index <- losses > reporting_thresholds losses <- losses[index] reporting_thresholds <- reporting_thresholds[index] PiecewisePareto_ML_Estimator_Alpha(losses, c(100,200,300), truncation = 500, truncation_type = "wd") PiecewisePareto_ML_Estimator_Alpha(losses, c(100,200,300), truncation = 500, truncation_type = "wd", reporting_thresholds = reporting_thresholds) losses <- c(140, 240, 490, 200, 110, 710, 120, 190, 210, 310) w <- rep(1, length(losses)) w[1] <- 2 losses2 <- c(losses, losses[1]) PiecewisePareto_ML_Estimator_Alpha(losses, c(100,200,300), weights = w) PiecewisePareto_ML_Estimator_Alpha(losses2, c(100,200,300))
Calculates the density function of the piecewise Pareto distribution. This function is deprecated. Use dPiecewisePareto
instead.
PiecewisePareto_PDF(x, t, alpha, truncation = NULL, truncation_type = "lp")
PiecewisePareto_PDF(x, t, alpha, truncation = NULL, truncation_type = "lp")
x |
Numeric. The function evaluates the density at |
t |
Numeric vector. Thresholds of the piecewise Pareto distribution. |
alpha |
Numeric vector. |
truncation |
Numeric. If |
truncation_type |
Character. If |
Density function of the piecewise Pareto distribution with parameter vectors t
and alpha
evaluated at x
t <- c(1000, 2000, 3000) alpha <- c(1, 1.5, 2) x <- 0:10 * 1000 dPiecewisePareto(x, t, alpha) dPiecewisePareto(x, t, alpha, truncation = 5000, truncation_type = "lp") dPiecewisePareto(x, t, alpha, truncation = 5000, truncation_type = "wd")
t <- c(1000, 2000, 3000) alpha <- c(1, 1.5, 2) x <- 0:10 * 1000 dPiecewisePareto(x, t, alpha) dPiecewisePareto(x, t, alpha, truncation = 5000, truncation_type = "lp") dPiecewisePareto(x, t, alpha, truncation = 5000, truncation_type = "wd")
Calculates the cumulative distribution function of a Pareto distribution
pPareto(x, t, alpha, truncation = NULL)
pPareto(x, t, alpha, truncation = NULL)
x |
Numeric. The function evaluates the CDF at |
t |
Numeric. Threshold of the Pareto distribution. |
alpha |
Numeric. Pareto alpha. |
truncation |
Numeric. If |
Distribution function of the Pareto distribution with parameters t
and alpha
evaluated at x
x <- 0:10 * 1000 pPareto(x, 1000, 2) pPareto(x, 1000, 2, truncation = 5000)
x <- 0:10 * 1000 pPareto(x, 1000, 2) pPareto(x, 1000, 2, truncation = 5000)
Calculates the cumulative distribution function of a Piecewise Pareto Distribution
pPiecewisePareto(x, t, alpha, truncation = NULL, truncation_type = "lp")
pPiecewisePareto(x, t, alpha, truncation = NULL, truncation_type = "lp")
x |
Numeric. The function evaluates the CDF at |
t |
Numeric vector. Thresholds of the piecewise Pareto distribution. |
alpha |
Numeric vector. |
truncation |
Numeric. If |
truncation_type |
Character. If |
Distribution function of the piecewise Pareto distribution with parameter vectors t
and alpha
evaluated at x
Riegel, U. (2018) Matching tower information with piecewise Pareto. European Actuarial Journal 8(2): 437–460
t <- c(1000, 2000, 3000) alpha <- c(1, 1.5, 2) x <- 0:10 * 1000 pPiecewisePareto(x, t, alpha) pPiecewisePareto(x, t, alpha, truncation = 5000, truncation_type = "lp") pPiecewisePareto(x, t, alpha, truncation = 5000, truncation_type = "wd")
t <- c(1000, 2000, 3000) alpha <- c(1, 1.5, 2) x <- 0:10 * 1000 pPiecewisePareto(x, t, alpha) pPiecewisePareto(x, t, alpha, truncation = 5000, truncation_type = "lp") pPiecewisePareto(x, t, alpha, truncation = 5000, truncation_type = "wd")
Constructor function for the PPP_Model object
PPP_Model( FQ = NULL, t = NULL, alpha = NULL, truncation = NULL, truncation_type = "lp", dispersion = 1, Status = 0, Comment = "OK" )
PPP_Model( FQ = NULL, t = NULL, alpha = NULL, truncation = NULL, truncation_type = "lp", dispersion = 1, Status = 0, Comment = "OK" )
FQ |
Numerical. Expected claim count of the collective model. |
t |
Numeric vector. Vector containing the thresholds of the Piecewise Pareto distribution. |
alpha |
Numeric vector. Vector containing the alphas of the Piecewise Pareto distribution. |
truncation |
Numerical. If |
truncation_type |
Character. If |
dispersion |
Numerical. Dispersion of the Panjer distribution (i.e. variance to mean ratio). |
Status |
Numerical indicator if a function returns a PPP_Model object: 0 = success, 1 = some information has been ignored, 2 = no solution found |
Comment |
Charakter. An optional comment. |
PPPM <- PPP_Model(2, c(1000,2000), c(1,2), dispersion = 2) PPPM
PPPM <- PPP_Model(2, c(1000,2000), c(1,2), dispersion = 2) PPPM
Calculates the expected frequency in excess of a threshold for a PPP_Model
PPP_Model_Excess_Frequency(x, PPP_Model)
PPP_Model_Excess_Frequency(x, PPP_Model)
x |
Numeric. Threshold. |
PPP_Model |
PPP_Model object. |
The expected frequency in excess of x
for the given PPP_Model
PPPM <- PiecewisePareto_Match_Layer_Losses(Example1_AP, Example1_EL) PPPM Excess_Frequency(PPPM, c(-Inf, 0, 1000, 2000, 3000, Inf))
PPPM <- PiecewisePareto_Match_Layer_Losses(Example1_AP, Example1_EL) PPPM Excess_Frequency(PPPM, c(-Inf, 0, 1000, 2000, 3000, Inf))
Calculates the expected loss of a reinsurance layer for a PPP_Model. This function is deprecated. Use Layer_Mean
instead.
PPP_Model_Exp_Layer_Loss(Cover, AttachmentPoint, PPP_Model)
PPP_Model_Exp_Layer_Loss(Cover, AttachmentPoint, PPP_Model)
Cover |
Numeric. Cover of the reinsurance layer. Use |
AttachmentPoint |
Numeric. Attachment point of the reinsurance layer. |
PPP_Model |
PPP_Model object. |
The expected loss of the layer Cover
xs AttachmentPoint
for the given PPP_Model
PPPM <- PiecewisePareto_Match_Layer_Losses(Example1_AP, Example1_EL) PPPM Example1_Cov <- c(diff(Example1_AP), Inf) Example1_AP Example1_Cov Example1_EL Layer_Mean(PPPM, Example1_Cov, Example1_AP)
PPPM <- PiecewisePareto_Match_Layer_Losses(Example1_AP, Example1_EL) PPPM Example1_Cov <- c(diff(Example1_AP), Inf) Example1_AP Example1_Cov Example1_EL Layer_Mean(PPPM, Example1_Cov, Example1_AP)
Calculates the standard deviation of the loss in a reinsurance layer for a PPP_Model
PPP_Model_Layer_Sd(Cover, AttachmentPoint, PPP_Model)
PPP_Model_Layer_Sd(Cover, AttachmentPoint, PPP_Model)
Cover |
Numeric. Cover of the reinsurance layer. Use |
AttachmentPoint |
Numeric. Attachment point of the reinsurance layer. |
PPP_Model |
PPP_Model object. |
The standard deviation of the loss in the layer Cover
xs AttachmentPoint
for the given PPP_Model
PPPM <- PiecewisePareto_Match_Layer_Losses(Example1_AP, Example1_EL) PPPM Example1_Cov <- c(diff(Example1_AP), Inf) Layer_Sd(PPPM, Example1_Cov, Example1_AP)
PPPM <- PiecewisePareto_Match_Layer_Losses(Example1_AP, Example1_EL) PPPM Example1_Cov <- c(diff(Example1_AP), Inf) Layer_Sd(PPPM, Example1_Cov, Example1_AP)
Calculates the variance of the loss in a reinsurance layer for a PPP_Model. This function is deprecated. Use Layer_Var
instead.
PPP_Model_Layer_Var(Cover, AttachmentPoint, PPP_Model)
PPP_Model_Layer_Var(Cover, AttachmentPoint, PPP_Model)
Cover |
Numeric. Cover of the reinsurance layer. Use |
AttachmentPoint |
Numeric. Attachment point of the reinsurance layer. |
PPP_Model |
PPP_Model object. |
The variance of the loss in the layer Cover
xs AttachmentPoint
for the given PPP_Model
PPPM <- PiecewisePareto_Match_Layer_Losses(Example1_AP, Example1_EL) PPPM Example1_Cov <- c(diff(Example1_AP), Inf) Layer_Var(PPPM, Example1_Cov, Example1_AP)
PPPM <- PiecewisePareto_Match_Layer_Losses(Example1_AP, Example1_EL) PPPM Example1_Cov <- c(diff(Example1_AP), Inf) Layer_Var(PPPM, Example1_Cov, Example1_AP)
Simulates losses of a PPP_Model
PPP_Model_Simulate(n, PPP_Model)
PPP_Model_Simulate(n, PPP_Model)
n |
Integer. Number of Simulations. |
PPP_Model |
PPP_Model object. |
A matrix where row k contains the simulated losses of the kth simulation.
PPPM <- PiecewisePareto_Match_Layer_Losses(c(1000, 2000, 3000), c(2000, 1000, 500), truncation = 10000, truncation_type = "wd") PPPM Simulate_Losses(PPPM, 100)
PPPM <- PiecewisePareto_Match_Layer_Losses(c(1000, 2000, 3000), c(2000, 1000, 500), truncation = 10000, truncation_type = "wd") PPPM Simulate_Losses(PPPM, 100)
Print method for PGP_Model objects
## S3 method for class 'PGP_Model' print(x, ...)
## S3 method for class 'PGP_Model' print(x, ...)
x |
PGP_Model object. |
... |
Other arguments, all currently ignored. |
Print method for PPP_Model objects
## S3 method for class 'PPP_Model' print(x, ...)
## S3 method for class 'PPP_Model' print(x, ...)
x |
PPP_Model object. |
... |
Other arguments, all currently ignored. |
Calculates the quantile function of a generalized Pareto distribution
qGenPareto(p, t, alpha_ini, alpha_tail, truncation = NULL)
qGenPareto(p, t, alpha_ini, alpha_tail, truncation = NULL)
p |
Numeric. The function evaluates the inverse CDF at |
t |
Numeric. Threshold of the piecewise Pareto distribution. |
alpha_ini |
Numeric. Initial Pareto alpha. |
alpha_tail |
Numeric. Tail Pareto alpha. |
truncation |
Numeric. If |
Quantile function of the Pareto distribution with parameters t
, alpha_ini
and alpha_tail
, evaluated at p
p <- 0:10 * 0.1 qGenPareto(p, 1000, 2, 3) qGenPareto(p, 1000, 2, 3, truncation = 5000)
p <- 0:10 * 0.1 qGenPareto(p, 1000, 2, 3) qGenPareto(p, 1000, 2, 3, truncation = 5000)
Calculates the quantile function of a Pareto distribution
qPareto(p, t, alpha, truncation = NULL)
qPareto(p, t, alpha, truncation = NULL)
p |
Numeric. The function evaluates the inverse CDF at |
t |
Numeric. Threshold of the piecewise Pareto distribution. |
alpha |
Numeric. Pareto alpha. |
truncation |
Numeric. If |
Quantile function of the Pareto distribution with parameters t
and alpha
, evaluated at p
p <- 0:10 * 0.1 qPareto(p, 1000, 2) qPareto(p, 1000, 2, truncation = 5000)
p <- 0:10 * 0.1 qPareto(p, 1000, 2) qPareto(p, 1000, 2, truncation = 5000)
Calculates the quantile function of a piecewise Pareto distribution
qPiecewisePareto(p, t, alpha, truncation = NULL, truncation_type = "lp")
qPiecewisePareto(p, t, alpha, truncation = NULL, truncation_type = "lp")
p |
Numeric. The function evaluates the quantile function at |
t |
Numeric vector. Thresholds of the piecewise Pareto distribution. |
alpha |
Numeric vector. |
truncation |
Numeric. If |
truncation_type |
Character. If |
Quantile function of the piecewise Pareto distribution with parameter vectors t
and alpha
evaluated at p
t <- c(1000, 2000, 3000) alpha <- c(1, 1.5, 2) p <- 0:10 * 0.1 qPiecewisePareto(p, t, alpha) qPiecewisePareto(p, t, alpha, truncation = 5000, truncation_type = "lp") qPiecewisePareto(p, t, alpha, truncation = 5000, truncation_type = "wd")
t <- c(1000, 2000, 3000) alpha <- c(1, 1.5, 2) p <- 0:10 * 0.1 qPiecewisePareto(p, t, alpha) qPiecewisePareto(p, t, alpha, truncation = 5000, truncation_type = "lp") qPiecewisePareto(p, t, alpha, truncation = 5000, truncation_type = "wd")
Generates random deviates of a generalized Pareto distribution
rGenPareto(n, t, alpha_ini, alpha_tail, truncation = NULL)
rGenPareto(n, t, alpha_ini, alpha_tail, truncation = NULL)
n |
Numeric. Number of observations. |
t |
Numeric vector. Thresholds of the generalized Pareto distributions |
alpha_ini |
Numeric vector. Initial Pareto alphas of the generalized Pareto distributions. |
alpha_tail |
Numeric vector. Tail Pareto alphas of the generalized Pareto distributions. |
truncation |
NULL or Numeric vector. If |
A vector of n
samples from the (truncated) generalized Pareto distribution with parameters t
, alpha_ini
and alpha_tail
rGenPareto(100, 1000, 2, 3) rGenPareto(100, 1000, 2, 3, truncation = 2000) rGenPareto(100, t = c(1, 10, 100, 1000), alpha_ini = 1, alpha_tail = c(2, 5))
rGenPareto(100, 1000, 2, 3) rGenPareto(100, 1000, 2, 3, truncation = 2000) rGenPareto(100, t = c(1, 10, 100, 1000), alpha_ini = 1, alpha_tail = c(2, 5))
Generates random deviates of a Pareto distribution
rPareto(n, t, alpha, truncation = NULL)
rPareto(n, t, alpha, truncation = NULL)
n |
Numeric. Number of observations. |
t |
Numeric vector. Thresholds of the Pareto distributions |
alpha |
Numeric vector. Pareto alphas of the Pareto distributions. |
truncation |
NULL or Numeric vector. If |
A vector of n
samples from the (truncated) Pareto distribution with parameters t
and alpha
rPareto(100, 1000, 2) rPareto(100, 1000, 2, truncation = 2000) rPareto(100, t = c(1, 10, 100, 1000, 10000), alpha = c(1, 2, 4, 8, 16))
rPareto(100, 1000, 2) rPareto(100, 1000, 2, truncation = 2000) rPareto(100, t = c(1, 10, 100, 1000, 10000), alpha = c(1, 2, 4, 8, 16))
Generates random deviates of a piecewise Pareto distribution
rPiecewisePareto( n, t, alpha, truncation = NULL, truncation_type = "lp", scale_pieces = NULL )
rPiecewisePareto( n, t, alpha, truncation = NULL, truncation_type = "lp", scale_pieces = NULL )
n |
Numeric. Number of simulations |
t |
Numeric vector. Thresholds of the piecewise Pareto distribution. |
alpha |
Numeric vector. |
truncation |
Numeric. If |
truncation_type |
Character. If |
scale_pieces |
Numeric vector. If not |
A vector of n
samples from the (truncated) piecewise Pareto distribution with parameter vectors t
and alpha
t <- c(1000, 2000, 3000) alpha <- c(1, 1.5, 2) rPiecewisePareto(100, t, alpha) rPiecewisePareto(100, t, alpha, truncation = 5000) rPiecewisePareto(100, t, alpha, truncation = 5000, truncation_type = "lp") rPiecewisePareto(100, t, alpha, truncation = 5000, truncation_type = "wd")
t <- c(1000, 2000, 3000) alpha <- c(1, 1.5, 2) rPiecewisePareto(100, t, alpha) rPiecewisePareto(100, t, alpha, truncation = 5000) rPiecewisePareto(100, t, alpha, truncation = 5000, truncation_type = "lp") rPiecewisePareto(100, t, alpha, truncation = 5000, truncation_type = "wd")
Simulates losses with a collective model
Simulate_Losses(CollectiveModel, nyears = 1)
Simulate_Losses(CollectiveModel, nyears = 1)
CollectiveModel |
A collective model object. Currently only |
nyears |
Integer. Number of simulated years. |
A matrix where row k contains the simulated losses of the kth simulated year.
PPPM <- PiecewisePareto_Match_Layer_Losses(c(1000, 2000, 3000), c(2000, 1000, 500), truncation = 10000, truncation_type = "wd") PPPM Simulate_Losses(PPPM, 100)
PPPM <- PiecewisePareto_Match_Layer_Losses(c(1000, 2000, 3000), c(2000, 1000, 500), truncation = 10000, truncation_type = "wd") PPPM Simulate_Losses(PPPM, 100)
Simulates losses with a PGP_Model
## S3 method for class 'PGP_Model' Simulate_Losses(CollectiveModel, nyears = 1)
## S3 method for class 'PGP_Model' Simulate_Losses(CollectiveModel, nyears = 1)
CollectiveModel |
PGP_Model object. |
nyears |
Integer. Number of simulated years. |
A matrix where row k contains the simulated losses of the kth simulated year.
PGPM <- PGP_Model(2, 1000, 1, 2, dispersion = 2) PGPM Simulate_Losses(PGPM, 100)
PGPM <- PGP_Model(2, 1000, 1, 2, dispersion = 2) PGPM Simulate_Losses(PGPM, 100)
Simulates losses with a PPP_Model
## S3 method for class 'PPP_Model' Simulate_Losses(CollectiveModel, nyears = 1)
## S3 method for class 'PPP_Model' Simulate_Losses(CollectiveModel, nyears = 1)
CollectiveModel |
PPP_Model object. |
nyears |
Integer. Number of simulated years. |
A matrix where row k contains the simulated losses of the kth simulated year.
PPPM <- PiecewisePareto_Match_Layer_Losses(c(1000, 2000, 3000), c(2000, 1000, 500), truncation = 10000, truncation_type = "wd") PPPM Simulate_Losses(PPPM, 100)
PPPM <- PiecewisePareto_Match_Layer_Losses(c(1000, 2000, 3000), c(2000, 1000, 500), truncation = 10000, truncation_type = "wd") PPPM Simulate_Losses(PPPM, 100)