GenPareto_ML_Estimator_Alpha | R Documentation |
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
)
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.