PiecewisePareto_ML_Estimator_Alpha: Maximum Likelihood Estimation of the Alphas of the Piecewise...

View source: R/Functions.R

PiecewisePareto_ML_Estimator_AlphaR Documentation

Maximum Likelihood Estimation of the Alphas of the Piecewise Pareto Distribution

Description

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

Usage

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
)

Arguments

losses

Numeric vector. Losses that are used for the ML estimation.

t

Numeric vector. Thresholds of the piecewise Pareto distribution.

truncation

Numeric. 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.

reporting_thresholds

Numeric vector. Allows to enter loss specific reporting thresholds. If NULL then all reporting thresholds are assumed to be less than or equal to t[1].

is.censored

Logical vector. TRUE indicates that a loss has been censored by the policy limit. The assumption is that the uncensored losses are piecewise Pareto distributed with the alphas we are looking for. is.censored = NULL means that no losses are censored.

weights

Numeric vector. Weights for the losses. For instance weights[i] = 2 and weights[j] = 1 for j != i has the same effect as adding another loss of size loss[i].

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).

Value

Maximum likelihood estimator for the parameter alpha of a Pareto distribution with threshold t given the observations losses

Examples

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))

ulrichriegel/Pareto documentation built on April 21, 2023, 8:39 p.m.