Extreme Value Statistics and Quantile Estimation

Code to fit, plot and compare several (extreme value) distribution functions. Can also compute (truncated) distribution quantile estimates and draw a plot with return periods on a linear scale.

Fit, plot and compare several (extreme value) distributions. Can also compute (truncated) distribution quantile estimates and draw a plot with return periods on a linear scale.

See the Vignette for an introduction to the package.


CRAN_Status_Badge downloads Rdoc

Install / load the package and browse through the examples:

# update to the current development version:


If direct installation from CRAN doesn't work, your R version might be too old. In that case, an update is really recommendable: r-project.org. If you can't update R, try installing from source (github) via instGit or devtools as mentioned above. If that's not possible either, here's a manual workaround: click on Clone or Download - Download ZIP (topright, link), unzip the file to some place, then

dd <- dir("extremeStat-master/R", full=T)
dummy <- sapply(dd, source)

This creates all R functions as objects in your globalenv workspace (and overwrites existing objects of the same name!).


extremeStat ToDo-list / wishlist / issues

  • read all of https://www.ine.pt/revstat/pdf/rs120102.pdf and coles (2001)
  • distLextreme, distLquantile, q_gpd: reduce example section, potentially move some to tests. add Nile, rain, danish
  • split up q_gpd into f_gpd, p/q/d/r_gpd and comp_gpd
  • distLexBoot (+plot) conf.lev vectorization
  • distLquantile and g_gpd: reference to vignette POT

extremeStat Package by Berry Boessenkool, [email protected] Any feedback is welcome, per email or on github.com/brry/extremeStat

Version 1.4.0 (2017-11-02)

  • printL improved
  • distLexBoot now uses npy
  • distLextreme can now use truncate
  • examples improved
  • deprecated functions are now entirely removed

Version 1.3.0 (2017-01-26) Package thoroughly cleaned up and restructured:

  • plot functions renamed to common syntax plotL***
  • distLgof integrated into distLfit, but weight part moved into distLweights
  • q_gpd now computes RMSE as well
  • distLextreme can now use POT approach with argument npy
  • fitting failure checks now more extensive + all concentrated in distLfit
  • failure outputs and messages have been improved
  • computing functions do not plot anymore (for more clarity and reproducibility)
  • more code is now formally tested with testthat
  • gofProp option completely removed (POT support is very good now)
  • order option now available throughout the package
  • more line breaks in source code for better readibility
  • on.exit calls changed to immediate messages
  • distLquantile gains sanity checks
  • weightp dataset included
  • extensive use of berryFunctions::tryStack to trace errors and warnings
  • several arguments removed and some renamed
  • documentation more standardized, vignette expanded

For all changes, see https://github.com/brry/extremeStat/compare/[email protected]{2016-12-13}[email protected]{2017-01-26}#files_bucket

new functions: distLweights, q_weighted, plotLquantile removed: distLgof renamed: distLprint -> printL, distLextremePlot -> plotLextreme, distLgofPlot -> plotLweights, distLplot -> plotLfit

Version 0.6.0 (2016-12-12) For complete log, see https://github.com/brry/extremeStat/commits/master

  • several lmomco changes reflected
  • several rare errors (especially with very small sample sizes) captured
  • documentation updated, vignette clarified
  • distLextreme truncate bug corrected (was not passed to distLfit)
  • Licence made less restrictive (GPL3 changed to GPL>=2)
  • q_gpd captures (and reflects on) more potential errors
  • distLquantile q_gpd rownames are unified and sorted differently
  • distLgofPlot gained more customization options

Version 0.5.15 (2016-05-11) submitted to CRAN various changes, see github commit log at https://github.com/brry/extremeStat/commits/master highlights:

  • package has a vignette and is Roxygenized
  • quantile estimation now possible, function tested and expanded thoroughly
  • POT method (truncation parameter) introduced
  • GPD quantile comparison across 7 R packages
  • failed parameter fitting is handled much better, warning messages became useful
  • quiet argument added throughout the package
  • several defaults were improved
  • documentation was updated and enhanced, including comments in code
  • distLgof now returns weights calculated by 3 different methods
  • distLplot now uses supdist, package depends on lmomco >=2.1.3 (version that includes supdist)
  • installB: moved to https://github.com/brry/installB to remove devtools dependency here

new functions: distLextremePlot, distLprint, distLquantile, q_gpd renamed distLgofPlot for consistency in lowerCamel-derived case usage.

Version 0.4 (2014-12-04) depends on berryFunctions again (maintaning functions twice is nonsense)

  • distLgof now has ks and quiet argument
  • distLplot now has las and ylab arguments
  • distLfit gained quiet argument

Version 0.3 (2014-09-30) independent from berryFunctions now. Thus I included lim0, logAxis, logVals, owa, rainbow2, rmse, rsquare

Version 0.2 (2014-09-22) First version submitted to CRAN, was not accepted. Documentation slightly refined here and there changed all "cat" to "message" added datname element in dlf, used for main and xlab in all suitable plots

  • distLplot:

log=TRUE now works properly, as it just draws logAxis

logargs argument added

PDF lines now truncated to support region of distribution

plots with xlim outside of support region now possible without error

new default for color vector

density plot now with lim0

if(percentline), a vartical dashed line at gofProp is drawn

  • distLgof:

plot default is now TRUE

  • distLfit

distLgof is now explicitly called with plot=FALSE

  • distLgofplot:

received a bunch of graphic arguments

'order' and 'add' arguments added

Version 0.1 (2014-09-15) Initial build with the functions: distLextreme (replacing berryFunctions::extremeStatLmom) distLfit distLplot distLgof distLgofplot

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.


1.4.0 by Berry Boessenkool, 4 years ago


Report a bug at https://github.com/brry/extremeStat

Browse source code at https://github.com/cran/extremeStat

Authors: Berry Boessenkool

Documentation:   PDF Manual  

Task views: Extreme Value Analysis

GPL (>= 2) license

Imports lmomco, berryFunctions, pbapply, RColorBrewer, grDevices, graphics, methods, stats, utils, evir, ismev, fExtremes, extRemes, evd, Renext

Suggests testthat, knitr, rmarkdown

See at CRAN