Generalised Additive Extreme Value Models
Overview
Methods for fitting various extreme value distributions with parameters of generalised additive model (GAM) form are provided. For details of distributions see Coles, S.G. (2001) doi:10.1007/978-1-4471-3675-0, GAMs see Wood, S.N. (2017) doi:10.1201/9781315370279, and the fitting approach see Wood, S.N., Pya, N. & Safken, B. (2016) doi:10.1080/01621459.2016.1180986. Details of how evgam works and various examples are given in Youngman, B.D. (2022) doi:10.18637/jss.v103.i03.
Changes:
- Smooths can now use
idargument ofmgcv::s()to allow multiple smooths to have same smoothing parameter. - Objects in workspace can now be used in
evgam()'sformulaargument (as opposed to all variables needing to be part ofdata). - Added function and class
geoevgamwith S3 methodplotfor fitting and plotting geometric extreme value models. (Thanks to Callum Murphy-Barltrop, Jenny Wadsworth and Miguel de Carvalho.) - Added
type = 'qqplot2'topredict()for residual-based QQ-plots. (Thanks to Jenny Wadsworth.) - Added
family = 'gw'for fitting generalised Weibull distribution. (Thanks to Cees de Valk.) - Added
family = 'poisson'for fitting Poisson distribution. - Added
args(dist = 'aggauss')for fittingfamily = 'condex'with asymmetric generalised Gaussian residuals. (Thanks again to Kristina Bratkova and Aiden Farrell.) - Added
family = 'aggauss'for fitting asymmetric generalised Gaussian distribution. (Thanks to Kristina Bratkova and Aiden Farrell.) - GPD model with shape parameter constrained to [-0.5, 1.0] added with
family = "gpd2". - Added
ltgammaandltgammabfamilies for the left truncated gamma distribution with unknown and know shape, respectively. Useargs = list(lower = )to give the scalar, vector or matrix of left-truncation points, andargs = list(alpha = )to give scalar, vector or matrix of gamma distribution shape parameters with familyltgammab. - Added
condexfamily, for conditional extreme value model of Heffernan and Tawn (2004, https://doi.org/10.1111/j.1467-9868.2004.02050.x). For an example see https://byoungman.github.io/evgam/condex/.
Show all changes in 1.0.2Hide the rest of the changes in 1.0.2
- Added
betaandlogitgaussfamilies. - Added option
sparse = TRUE, which coerces matrices to sparse matrices through packageMatrixwhere possible. Particularly useful forbs = 're'orbs = 'mrf'. - Added
df2matdf()for turning a vector response to a matrix response if explanatory variable combinations are repeated. - Added functionality to fit extended generalised Pareto distribution through
evgam(..., family = "egpd"). See Naveau et al. (W2016, https://doi.org/10.1002/2015WR018552) andfamily.evgam. (Thanks to Touqeer Ahmad.) - Added functionality to fit blended generalised extreme value (GEV) distribution through
evgam(..., family = "bgev"). See Castro-Camilo et al. (2022, https://doi.org/10.1002/env.2742) andfamily.evgam. (Thanks to Jordan Richards.) - Also added
dbgev(),pbgev(),qbgev()andrbgev()for density, distribution function, quantile function and random generation, respectively, for the blended GEV distribution. - Added functionality to fit models via custom likelihood functions, i.e. extending those available in
evgamthroughfamily = .... Seecustom.family.evgam. - Added functionality to constrain both GPD parameters using
gpd.args = list(lower = ..., upper = ...). (Thanks to Callum Murphy-Barltrop.) - GEV model with shape parameter constrained to [-0.5, 1.0] added with
family = "gev2".
Bug fixes:
- Slight change to calculation of log determinant of penalty matrices and their derivatives for tensor smooths. Should implement algorithm in Appendix B of Wood (2011, https://doi.org/10.1111/j.1467-9868.2010.00749.x)
- That only variables are checked as being supplied to
datais now properly detected. (Thanks, Simon Brown.) - That values of smoothing parameters supplied to
evgam()are properly recognised has been fixed.
From NEWS.md in the release
Install
Health
- OK13 OK2026-09-09
- NOTE11 OK, 2 NOTE2026-07-16
- OK13 OK2026-06-09
- WARNING12 OK, 1 WARNING2026-06-08
- OK12 OK2026-04-25
Show 3 earlier changesHide 3 earlier changes
- NOTE12 OK, 2 NOTE2026-04-22
- ERROR11 OK, 2 NOTE, 1 ERROR2026-04-18
- NOTE12 OK, 2 NOTE2026-03-10
Documentation
- Help pages
- 31 (1 internal)includes a package overview page
- Examples that run
- 100%25 run in a plain check
- Exported functions with examples
- 75%
- Documented parameters
- 82%
- Return-value docs
- 100%
- Help pages citing references
- 35%
Downloads
Dependencies
Installing evgam adds 2 packages (2 with compiled code, 2.8 MB of source tarballs). Heaviest: Rcpp 1.8 MB, RcppArmadillo 1.0 MB.
Code & Tests
Datasets
People & History
Pick two releases to compare their code metrics.
- 1.0.2Latest2026-09-03 · current release · diff ↗ ·
removed 1 export
fevgamadded 15 exports
bgev2gev, dbgev, df2matdf, dlaplace, evgam.control, geoevgam, gev2bgev, pbgev, plaplace, polarise, qbgev, qlaplace, rbgev, rlaplace, rmvnorm - RR 4.6.0 released · 2026-04-24
- 1.0.12025-09-23 · diff ↗
- RR 4.5.0 released · 2025-04-11
- RR 4.4.0 released · 2024-04-24
- RR 4.3.0 released · 2023-04-21
- 1.0.02022-06-28 · diff ↗
- RR 4.2.0 released · 2022-04-22
- RR 4.1.0 released · 2021-05-18
- 0.1.42020-08-26 · diff ↗
- RR 4.0.0 released · 2020-04-24
- 0.1.2
- 0.1.12020-03-15 · diff ↗
- 0.1.02020-03-08
- RR 3.6.0 released · 2019-04-26
Package metadata
- First published
- 2020-03-08
- Total releases
- 7 / 6 yrs
- License
- GPL-3 OSI
- Minimum R
- ≥ 3.5.0
- Bundled data
- 491 KB / 3 files
- Download size
- 790 KB
Cite
Cite this package
Run in R for the authors' preferred citation:
citation("evgam")This package has no citation file, so citation() returns this entry built from DESCRIPTION.
Cite the R Observatory
For a number measured here: a download total, a coverage figure, an archival date.
From data release v2026-10-23, which the citation names so these numbers can be found later. More on citing and the projects behind them.