Learn R Programming

evmix (version 1.0)

lgpd: Log-likelihood of Generalised Pareto Distribution (GPD)

Description

Log-likelihood and negative log-likelihood for the GPD conditional on being above a threshold u with parameters scale sigmau and shape xi. Unconditional likelihood also provided when the probability phiu of being above the threshold u is given.

Usage

lgpd(x, u = 0, sigmau = 1, xi = 0, phiu = 1, log = TRUE)

  nlgpd(pvector, x, u = 0, phiu = 1, finitelik = FALSE)

Arguments

x
quantile
u
threshold
sigmau
scale parameter (non-negative)
xi
shape parameter
phiu
probability of being above threshold [0,1]
log
logical, if TRUE then log density
pvector
vector of initial values of GPD parameters (sigmau, xi) or NULL
finitelik
logical, should log-likelihood return finite value for invalid parameters

Value

  • lgpd gives (log-)likelihood and nlgpd gives the negative log-likelihood.

Details

The GPD likelihood functions for the exceedances of the threshold u as used in the maximum likelihood fitting function fgpd. They are designed to be used for MLE in fgpd but are available for wider usage, e.g. constructing your own extreme value mixture models. See fgpd and dgpd for full details. Log-likelihood calculations are carried out in lgpd, which takes parameters as inputs in the same form as distribution functions. The negative log-likelihood is a wrapper for lgpd, designed towards making it useable for optimisation (e.g. parameters are given a vector as first input). Unlike the MLE function fgpd, the phiu must be in range $[0, 1]$ and cannot be NULL. Specify phiu=1 for conditional likelihood (default) and phiu<1< code=""> for unconditional likelihood. The function lgpd carries out the calculations for the log-likelihood directly, which can be exponentiated to give actual likelihood using (log=FALSE).

References

Based on GPD likelihood function in the evd package. http://en.wikipedia.org/wiki/Generalized_Pareto_distribution

See Also

dgpd, fpot and fitdistr Other gpd: dgpd, fgpd, gpd, pgpd, qgpd, rgpd