Learn R Programming

The texmex package for R

Extreme value modelling with R. Includes univariate modelling using generalized Pareto, generalized extreme value, Weibull and Gumbel distributions, and the multivariate conditional approach of Heffernan and Tawn.

The package contains a test suite that depends on the testthat package. To use the test suite, install using 'R CMD INSTALL --install-tests' and then running 'devtools::test("texmex")' within R, where "texmex" points to the package location.

This work was partially funded by AstraZeneca.

Copy Link

Version

Install

install.packages('texmex')

Monthly Downloads

621

Version

2.4.9

License

GPL (>= 2)

Issues

Pull Requests

Stars

Forks

Last Published

March 4th, 2024

Functions in texmex (2.4.9)

rglo

Generalized logistic distribution
edf

Compute empirical distribution function
.specfun.safe.product

Compute pmax(x y, -1) in such a way that zeros in x beat infinities in y.
.log1prel

Accurately compute log(1 + x) / x
degp3

Density, cumulative density, quantiles and random number generation for the extended generalized Pareto distribution 3
dgpd

Density, cumulative density, quantiles and random number generation for the generalized Pareto distribution
dgumbel

The Gumbel distribution
.log1mexp

Accurately compute log(1-exp(x))
.exprel

Accurately compute (exp(x) - 1) / x
dgev

Density, cumulative density, quantiles and random number generation for the generalized extreme value distribution
ggplot.copula

Fancy plotting for copulas
evmBoot

Bootstrap an evmOpt fit
ggplot.evmBoot

Diagnostic plots for the replicate estimated parameter values in an evmBoot object
evmSimSetSeed

Set the seed from a fitted evmSim object.
endPoint

Calculate upper end point for a fitted extreme value model
evmSim

MCMC simulation around an evmOpt fit
ggplot.declustered

Diagnostic plots for an declustered object
extremalIndex

Extremal index estimation and automatic declustering
egp3RangeFit

Estimate the EGP3 distribution power parameter over a range of thresholds
evm

Extreme value modelling
ggplot.rl.evmOpt

Plotting function for return level estimation
liver

Liver related laboratory data
gpd.prof

Profile likelihood based confidence intervals for GPD
makeReferenceMarginalDistribution

Provide full marginal reference distribution for for maringal transformation
logLik.evmOpt

Log-likelihood for evmOpt objects
ggplot.evmOpt

Diagnostic plots for an evm object
gpdRangeFit

Estimate generalized Pareto distribution parameters over a range of values
ggplot.evmSim

Diagnostic plots for the Markov chains in an evmSim object
ggplot.mex

Conditional multivariate extreme values modelling
mexDependence

Estimate the dependence parameters in a conditional multivariate extreme values model
mrl

Mean residual life plot
plot.copula

Plot copulas
plot.evmOpt

Plots for evmOpt objects
mexMonteCarlo

Simulation from dependence models
plot.evmSim

Plots for evmSim objects
print.evmOpt

Print evmOpt objects
migpdCoefs

Change values of parameters in a migpd object
mexRangeFit

Estimate dependence parameters in a conditional multivariate extreme values model over a range of thresholds.
plot.lp.evmOpt

Predict return levels from extreme value models, or obtain the linear predictors.
thinAndBurn

Process Metropolis output from extreme value model fitting to discard unwanted observations.
rFrechet

Extreme Value random process generation.
plot.rl.evmOpt

Return levels
ggplot.migpd

Fit multiple independent generalized Pareto models
rMaxAR

Extreme Value random process generation.
simulate.evmOpt

Simulate from a fitted evm object
rain, wavesurge and portpirie

Rain, wavesurge, portpirie and nidd datasets.
texmexFamily

Create families of distributions
texmex-package

Extreme value modelling
chi

Measures of extremal dependence
cv.evmOpt

Cross-validation for the shape parameter in an extreme values model
cv

Cross-validation for a model object
addExcesses

Annotate a threshold selection ggplot
AIC.evmOpt

Information Criteria
JointExceedanceCurve

Joint exceedance curves
copula

Calculate the copula of a matrix of variables
MCS

Multivariate conditional Spearman's rho
summer and winter data

Air pollution data, separately for summer and winter months
bootmex

Bootstrap a conditional multivariate extreme values model