Skip to contents

This function calls the fit.gpd routine on the sample of excesses and returns maximum likelihood estimates for all quantities of interest, including scale and shape parameters, quantiles and value-at-risk, expected shortfall and mean and quantiles of maxima of N threshold exceedances

Usage

gpd.mle(
  xdat,
  args = c("scale", "shape", "quant", "VaR", "ES", "Nmean", "Nquant"),
  m,
  N,
  p,
  q
)

Arguments

xdat

sample vector of excesses

args

vector of strings indicating which arguments to return the maximum likelihood values for

m

number of observations of interest for return levels. Required only for args values 'VaR' or 'ES'

N

size of block over which to take maxima. Required only for args Nmean and Nquant.

p

tail probability, equivalent to \(1/m\). Required only for args quant.

q

level of quantile for N-block maxima. Required only for args Nquant.

Value

named vector with maximum likelihood values for arguments args

Examples

xdat <- mev::rgp(n = 30, shape = 0.2)
gpd.mle(xdat = xdat, N = 100, p = 0.01, q = 0.5, m = 100)
#>      scale      shape      quant        VaR         ES      Nmean     Nquant 
#>  1.3783292 -0.3532796  3.1347373  3.1347373  3.3349106  3.2200786  3.2286869