An R package for the analysis of univariate, multivariate and functional extreme values. The package includes routine functions for univariate analyses multiple threshold selection diagnostics, optimization, bias-correction and tangent exponential model approximations, non-parametric spectral measure estimation using empirical likelihood methods, etc. Multivariate functionalities revolve around simulation algorithms for multivariate models, empirical likelihood, empirical dependence measures. Likelihood functions for elliptical processes and user-provided methodologies.
To install from Github, use
remotes::install_github("lbelzile/mev")after installing remotes.
The functionalities of the development version of the package (GIthub) are sorted below by topic.
The package focuses on likelihood based inference for parametric models.
Log likelihood, score and information matrices for the following univariate models:
gpd: generalized Pareto distribution (alternative parametrizationsgpde,gpdN,gpdr)gev: generalized extreme value distribution (alternative parametrizationsgevN,gevr)pp: inhomogeneous Poisson process for extremesrlarg: asymptotic r-largest order statistics
Fitting procedures and higher order asymptotic inference for univariate extremes
fit.*for maximum likelihood estimation*.bcorfor bias correction via score vectors or by subtraction*.pll: profile likelihood for objects*.temfor tangent exponential model approximation to profile likelihood
Two additional models and utilities for penultimate approximations
egp: extended generalized Pareto models of Papastathopoulos and Tawn (2013), and Gamet and Jonathan (2022)extgp: extended generalized Pareto models of Naveau et al. (2017)smith.penult: Smith (1987) penultimate approximations to parametric models
The routine fit.shape, or alternatively one of subroutines for real or positive (*) shape parameters.
shape.hill*: Hill's estimatorshape.osz: Pickands extreme U-statistic of Oorschot, Segers and Zhoushape.moment: moment estimator of Dekkers and de Haan.shape.pickands: Pickands estimator (poor performance)shape.vries*: de Vries estimator of de Haan and Peng.shape.genjack*: generalized jacknnife shape estimator of Gomes et al.shape.rbm*: Wager's random block maxima estimatorshape.genquant*: generalized quantileshape.trimhill*: trimmed Hill estimatorshape.lthill*: left-truncated Hill estimator
Note that both of the trimmed and truncated Hill estimators are not vectorized.
Second-order regular variation estimators (via fit.rho)
rho.dk: estimator of Drees and Kaufmann (1998)rho.gbw: estimator of Goegebeur, Beirland and de Wet (2008)rho.fagh: estimator of Fraga Alves, Gomes and de Haan (2003)rho.ghp: estimator of Gomes, de Haan and Peng (2002)
Functions for automatic selection of threshold with the peaks over threshold method
thselect.wseq: Wadsworth (2016) sequential analysis threshold diagnosticsthselect.vmetric: metric-based threshold selection of Varty et al. (2025+)thselect.ncpgp: Northrop and Coleman (2014) comparison of piecewise generalized Pareto versus generalized Pareto modelsthselect.egp: Comparison of extended generalized Pareto versus generalized Paretothselect.cv: del Castillo and Padilla (2016) coefficient of variation methodthselect.sdinfo: Suveges and Davison (2010) information matrix testthselect.mrl: Langousis et al. (2016) automatization of mean residual life diagnosticsthselect.pickands: Pickands (1985) goodness-of-fit threshold selection diagnosticthselect.alrs: automatic L-moments ratio selection method of Silva Lomba and Fraga Alves (2020)thselect.ksmd: Mahalanobis distance-based selection method based on L-moments of Kiran and Srivinas (2021)
Some semiparametric methods
thselect.bab: Bladt, Albrecher and Beirlant (2020) minimization of AMSE for Hill estimator via lower truncated Hillthselect.expgqtExponential generalized quantile threshold selection of Beirlant, Vynckier and Teugels (1996)thselect.gbw: Kernel-based threshold selection of Goegebeur, Beirlant and de Wet (2008)thselect.rbm: Random block maximum estimator of Wager (2014), with empirical Bayes risk minimizationthselect.pec: prediction error C-criterion with non-robust estimator of Dupuis and Victoria-Feser (2003)thselect.mdps: minimum distance threshold selection procedure of Clauset, Shalizi and Newman (2009)thselect.samsee: smooth asymptotic mean squared error estimator of Schneider, Krajina, and Krivobokova (2021)
tstab.gpd: threshold stability plots for generalized Paretotstab.egp: threshold stability plots for extended generalized Paretotstab.cv: coefficient of variation stability plottstab.mrl: mean residual life plottstab.hill: Hill plot
Some functionalities (incomplete) for multivariate models. There is currently no function to optimize multivariate threshold models, but likelihoods are provided for logistic, Brown--Resnick, Huesler--Reiss and extremal Student models
ibvpot: interpretation of bivariate models (extension ofevirfor all bivariate models fromevd)likmgp,clikmgp: (censored) likelihood for multivariate generalized Paretoexpme: exponent measure of parametric extreme value models
Two tests, one for max-stability and the other for asymptotic independence
test.maxstab: graphical test of max-stability (P-P plot)test.scoreindep: score test of asymptotic independence for bivariate logistic model
Estimation of the angular distribution using empirical estimation or empirical likelihood, with or without smoothing
angmeas: rank-based estimation of the angular measureangmeasdir: Dirichlet mixture smoothing of angular measure
Sampling algorithms for parametric models, multivariate and spatial extreme values, angular distribution and (generalized) risk-Pareto processes using accept-reject or composition sampling (approximate).
-
rrlarg: simulation of$r$ -largest observations from point process of extremes -
rdir: simulation of Dirichlet vectors -
rmnorm: simulation of multivariate normal vectors -
rmev: exact simulation of multivariate extreme value distributions -
rmevspec: random samples from angular distributions of multivariate extreme value models. -
rparp: simulation from R-Pareto processes -
rparpcs: simulation from Pareto processes (max) using composition sampling -
rparpcshr: simulation of generalized Huesler-Reiss Pareto vectors via composition sampling -
rgparp: simulation from generalized R-Pareto processes
Measures of tail dependence
-
xdep.eta: coefficient of extremal dependence$\eta$ (including routine for the estimator of Kruspskii and Joe inkjtail) -
xdep.chi: tail correlation$\chi$ . -
xdep.chibar: coefficient$\overline{\chi}$ -
xdep.xindex: extremal index estimators based on interexceedance time and gap of exceedances -
xdep.asym: estimators of the extremal asymmetry coefficient$\varphi$ .
Older functions that return similar summaries
-
adf: bivariate angular dependence function of Wadsworth and Tawn (2013) -
extcoef: estimators of the extremal coefficient -
taildep: estimators of coefficients of tail dependence$\eta$ and tail correlation$\chi$ -
angextrapo: bivariate tail dependence$\eta$ across rays -
extremo: pairwise extremogram as a function of distance for spatial data
Various datasets
abisko: Abisko rainfalleskrain: Eskdalemuir observatory daily rainfallfrwind: time series of wind speedsgeomagnetic: magnitude of geomagnetic stormsleedspollution: multivariate air pollutant from Leedsmaiquetia: Maiquetia daily rainfall seriesnidd: river Nidd daily flownutrients: interview component from NHANES on nutrientspandemics: estimated records on number of death from pandemicsvenice: Venice sea level dataw1500m: women 1500m track records
Some functionalities for fitting spatial data
distg,dgeoaniso: matrix of pairwise distance with geometric anisotropy- Variogram models (unexported functions
powerexp.cor,power.vario,schlather.vario) Lambda2cov: convert variogram to covariance of conditional random field
Functions used internally that could be of more general use.
emplik: empirical likelihood for vector meanwecdf: weighted empirical distribution functionspline.corrandtem.corr: corrections for Fraser--Reid objects to remove singularities nead the mode