| Title: | Generalized L-Moments Estimation for Extreme Value Distributions |
|---|---|
| Description: | Provides generalized L-moments estimation methods for the generalized extreme value ('GEV') distribution. Implements both stationary 'GEV' and non-stationary 'GEV11' models where location and scale parameters vary with time. Includes various penalty functions ('Martins'-'Stedinger', Park, Cannon, 'Coles'-Dixon) for shape parameter regularization. Also provides model averaging estimation ('ma.gev') that combines MLE and L-moment methods with multiple weighting schemes for robust high quantile estimation. The 'GLME' methodology is described in Shin et al. (2025a) <doi:10.48550/arXiv.2512.20385>. The non-stationary L-moment method is based on Shin et al. (2025b) <doi:10.1007/s42952-025-00325-3>. The model averaging method is described in Shin et al. (2026) <doi:10.1007/s00477-025-03167-x>. See also 'Hosking' (1990) <doi:10.1111/j.2517-6161.1990.tb01775.x> for L-moments theory and 'Martins' and 'Stedinger' (2000) <doi:10.1029/1999WR900330> for penalized likelihood methods. |
| Authors: | Yonggwan Shin [aut, cre] (ORCID: <https://orcid.org/0000-0001-6966-6511>), Seokkap Ko [aut, ctb] (ORCID: <https://orcid.org/0000-0001-9218-7236>), Jihong Park [ctb] (ORCID: <https://orcid.org/0009-0003-3191-9968>), Yire Shin [aut, dtc] (ORCID: <https://orcid.org/0000-0003-1297-5430>), Jeong-Soo Park [aut, ths] (ORCID: <https://orcid.org/0000-0002-8460-4869>) |
| Maintainer: | Yonggwan Shin <[email protected]> |
| License: | GPL (>= 3) |
| Version: | 1.3.1 |
| Built: | 2026-05-14 05:04:03 UTC |
| Source: | https://github.com/sygstat/glmom |
Annual maximum daily rainfall data from Bangkok, Thailand. This dataset is used for demonstrating model averaging methods for high quantile estimation in extreme value analysis.
bangkokbangkok
A data frame with 58 rows and 5 columns:
Annual maximum daily rainfall in mm (numeric)
2nd largest annual daily rainfall in mm (numeric)
3rd largest annual daily rainfall in mm (numeric)
4th largest annual daily rainfall in mm (numeric)
5th largest annual daily rainfall in mm (numeric)
Thai Meteorological Department (TMD; https://www.tmd.go.th)
Shin, Y., Shin, Y., & Park, J. S. (2026). Model averaging with mixed criteria for estimating high quantiles of extreme values: Application to heavy rainfall. Stochastic Environmental Research and Risk Assessment, 40(2), 47. doi:10.1007/s00477-025-03167-x
data(bangkok) head(bangkok) # Estimate high quantiles using model averaging result <- ma.gev(bangkok$X1, quant = c(0.99, 0.995)) print(result$qua.ma)data(bangkok) head(bangkok) # Estimate high quantiles using model averaging result <- ma.gev(bangkok$X1, quant = c(0.99, 0.995)) print(result$qua.ma)
Estimates parameters of a non-stationary GEV distribution using multiple methods: Weighted Least Squares (WLS), GN16 method, and the proposed L-moment method from Shin et al. (2025, J. Korean Stat. Soc.).
This is a convenience wrapper around glme.gev11 with pen="no",
providing compatibility with the original nsgev package interface.
gado.prop_11(xdat, ntry = 20, ftol = 1e-06)gado.prop_11(xdat, ntry = 20, ftol = 1e-06)
xdat |
A numeric vector of data to be fitted. |
ntry |
Number of attempts for optimization (default 20). |
ftol |
Function tolerance for optimization (default 1e-6). |
A list containing:
para.prop - L-moment based estimates (proposed method).
para.gado - GN16 method estimates.
para.wls - Weighted least squares estimates.
strup.org - Original non-stationary WLSE by Strup method.
lme.sta - Stationary L-moment estimates.
Yonggwan Shin, Seokkap Ko, Jihong Park, Yire Shin, Jeong-Soo Park
Shin, Y., Shin, Y. & Park, J.-S. (2025). Building nonstationary extreme value model using L-moments. Journal of the Korean Statistical Society, 54, 947-970. doi:10.1007/s42952-025-00325-3
glme.gev11 for the full GLME method with penalty functions,
nsgev for the simple interface.
data(Trehafod) result <- gado.prop_11(Trehafod$r1, ntry = 5) print(result$para.prop) print(result$lme.sta)data(Trehafod) result <- gado.prop_11(Trehafod$r1, ntry = 5) print(result$para.prop) print(result$lme.sta)
This function estimates the Generalized L-moments of Generalized Extreme Value distribution.
glme.gev( xdat, ntry = 10, pen = "beta", pen.choice = NULL, mu = -0.5, std = 0.2, p = 6, c1 = 10, c2 = 5 )glme.gev( xdat, ntry = 10, pen = "beta", pen.choice = NULL, mu = -0.5, std = 0.2, p = 6, c1 = 10, c2 = 5 )
xdat |
A numeric vector of data to be fitted. |
ntry |
Number of attempts for parameter estimation. Higher values increase the chance of finding a more accurate estimate by trying different initial conditions. |
pen |
Type of penalty function: Choose among "norm", "beta" (default), "ms", "park", "cannon", "cd", and "no" (without penalty function). |
pen.choice |
Choice number of penalty function specifying hyperparameters. For "beta": 1-6 correspond to different (p, c1, c2) combinations. For "norm": 1-4 correspond to different (mu, std) combinations. |
mu |
Mean hyperparameter for "norm" penalty function (default -0.5). |
std |
Standard deviation hyperparameter for "norm" penalty function (default 0.2). |
p |
Shape hyperparameter for "beta" penalty function (default 6). |
c1 |
Scaling hyperparameter for "beta" penalty function (default 10). |
c2 |
Upper limit hyperparameter for "beta" penalty function (default 5). |
The equations for the L-moments for LME of the GEVD are
where and .
Next, we define the generalized L-moments distance (GLD) as;
where is the variance-covariance matrix of the sample L-moments up to the third order.
The glme.gev function returns a list containing the following elements:
para.glme - The estimated parameters of the Generalized Extreme Value distribution.
para.lme - The L-moment estimates of the parameters.
covinv.lmom - The inverse of the covariance matrix of the L-moments.
lcovdet - The log determinant of the covariance matrix.
nllh.glme - The negative log-likelihood of the GLME solution.
pen - The penalization method used.
p_q - (for beta penalty) The p and q values used.
c1_c2 - (for beta penalty) The c1 and c2 values used.
mu_std - (for norm penalty) The mu and std values used.
Yonggwan Shin, Seokkap Ko, Jihong Park, Yire Shin, Jeong-Soo Park
Shin, Y., Shin, Y., Park, J. & Park, J.-S. (2025). Generalized method of L-moment estimation for stationary and nonstationary extreme value models. arXiv preprint arXiv:2512.20385. doi:10.48550/arXiv.2512.20385
glme.gev11 for non-stationary GEV estimation,
ma.gev for model averaging estimation,
glme.like for the objective function,
quagev.NS for quantile computation.
# Load example streamflow data data(streamflow) x <- streamflow$r1 # Estimate GEV parameters using beta penalty (default) result <- glme.gev(x, ntry = 5) print(result$para.glme) # Using Martins-Stedinger penalty result_ms <- glme.gev(x, ntry = 5, pen = "ms") print(result_ms$para.glme)# Load example streamflow data data(streamflow) x <- streamflow$r1 # Estimate GEV parameters using beta penalty (default) result <- glme.gev(x, ntry = 5) print(result$para.glme) # Using Martins-Stedinger penalty result_ms <- glme.gev(x, ntry = 5, pen = "ms") print(result_ms$para.glme)
This function estimates parameters of the non-stationary GEV11 model where mu(t) = mu0 + mu1*t and sigma(t) = exp(sigma0 + sigma1*t).
glme.gev11( xdat, ntry = 10, ftol = 1e-06, init.rob = TRUE, glme.pre = "wls", opt.choose = "gof", pen = "beta", pen.choice = NULL, mu = -0.55, std = 0.3, p = 6, c1 = 10, c2 = 5 )glme.gev11( xdat, ntry = 10, ftol = 1e-06, init.rob = TRUE, glme.pre = "wls", opt.choose = "gof", pen = "beta", pen.choice = NULL, mu = -0.55, std = 0.3, p = 6, c1 = 10, c2 = 5 )
xdat |
A numeric vector of data to be fitted. |
ntry |
Number of attempts for parameter estimation (default 10). |
ftol |
Tolerance for convergence (default 1e-6). |
init.rob |
Use robust regression for initialization (default TRUE). |
glme.pre |
Pre-estimation method: "wls" (default) or "gado". |
opt.choose |
Selection criterion: "gof" (default, goodness-of-fit) or "nllh" (negative log-likelihood). |
pen |
Type of penalty function: "norm", "beta" (default), "ms", "park", "cannon", "cd", or "no". |
pen.choice |
Choice number for penalty hyperparameters (default 6 for beta). |
mu |
Mean for normal penalty (default -0.55). |
std |
Std for normal penalty (default 0.3). |
p |
Shape for beta penalty (default 6). |
c1 |
Scaling for beta penalty (default 10). |
c2 |
Limit for beta penalty (default 5). |
A list containing:
para.glme - Proposed GLME estimates (5 parameters: mu0, mu1, sigma0, sigma1, xi).
para.lme - L-moment based estimates for non-stationary model.
para.gado - GN16 original estimates.
para.wls - Weighted least squares estimates (WLS).
strup.org - WLSE by strup method.
lme.sta - Stationary L-moment estimates.
pen - Penalty method used.
p_q - (for beta) p and q values.
c1_c2 - (for beta) c1 and c2 values.
Yonggwan Shin, Seokkap Ko, Jihong Park, Yire Shin, Jeong-Soo Park
Shin, Y., Shin, Y., Park, J. & Park, J.-S. (2025). Generalized method of L-moment estimation for stationary and nonstationary extreme value models. arXiv preprint arXiv:2512.20385. doi:10.48550/arXiv.2512.20385
Shin, Y., Shin, Y. & Park, J.-S. (2025). Building nonstationary extreme value model using L-moments. Journal of the Korean Statistical Society, 54, 947-970. doi:10.1007/s42952-025-00325-3
glme.gev for stationary GEV estimation,
nsgev for the pure L-moment wrapper (no penalty),
quagev.NS for non-stationary quantile computation.
# Load example streamflow data data(streamflow) x <- streamflow$r1 # Estimate non-stationary GEV11 parameters result <- glme.gev11(x, ntry = 5) print(result$para.glme) # Proposed GLME estimates print(result$para.lme) # L-moment based estimates# Load example streamflow data data(streamflow) x <- streamflow$r1 # Estimate non-stationary GEV11 parameters result <- glme.gev11(x, ntry = 5) print(result$para.glme) # Proposed GLME estimates print(result$para.lme) # L-moment based estimates
This function calculates the likelihood (or more precisely, a penalized negative log-likelihood) for the Generalized L-moments estimation of the Generalized Extreme Value (GEV) distribution.
glme.like( par = par, xdat = xdat, slmgev = slmgev, covinv = covinv, lcovdet = lcovdet, mu = mu, std = std, lme = lme, pen = pen, p = p, c1 = c1, c2 = c2 )glme.like( par = par, xdat = xdat, slmgev = slmgev, covinv = covinv, lcovdet = lcovdet, mu = mu, std = std, lme = lme, pen = pen, p = p, c1 = c1, c2 = c2 )
par |
A vector of GEV parameters (location, scale, shape). |
xdat |
A numeric vector of data. |
slmgev |
Sample L-moments of the data. |
covinv |
Inverse of the covariance matrix of the sample L-moments. |
lcovdet |
Log determinant of the covariance matrix. |
mu |
Mean for the normal penalization (used when pen='norm'). |
std |
Standard deviation for the normal penalization (used when pen='norm'). |
lme |
L-moment estimates of the parameters. |
pen |
Penalization method: 'norm', 'beta', 'ms', 'park', 'cannon', 'cd', or 'no'. |
p |
Shape parameter for beta penalty. |
c1 |
Scaling parameter for beta penalty. |
c2 |
Upper limit parameter for beta penalty. |
The function performs the following steps: 1. Checks if the parameters are within valid ranges. 2. Calculates the expected L-moments based on the current parameters. 3. Computes the difference between expected and sample L-moments. 4. Calculates the generalized L-moments distance. 5. Applies a penalization term based on the specified method. 6. Returns the sum of the L-moments distance and the penalization term.
A numeric value representing the penalized negative log-likelihood. A lower value indicates a better fit.
Yonggwan Shin, Seokkap Ko, Jihong Park, Yire Shin, Jeong-Soo Park
Shin, Y., Shin, Y., Park, J. & Park, J.-S. (2025). Generalized method of L-moment estimation for stationary and nonstationary extreme value models. arXiv preprint arXiv:2512.20385. doi:10.48550/arXiv.2512.20385
glme.gev which calls this function for optimization.
data(streamflow) x <- streamflow$r1 slm <- lmomco::lmoms(x, nmom = 3) cov_mat <- lmomco::lmoms.cov(x, nmom = 3) lme_par <- lmomco::pargev(slm)$para glme.like(par = lme_par, xdat = x, slmgev = slm, covinv = solve(cov_mat), lcovdet = log(det(cov_mat)), mu = -0.5, std = 0.2, lme = lme_par, pen = "beta", p = 6, c1 = 10, c2 = 5)data(streamflow) x <- streamflow$r1 slm <- lmomco::lmoms(x, nmom = 3) cov_mat <- lmomco::lmoms.cov(x, nmom = 3) lme_par <- lmomco::pargev(slm)$para glme.like(par = lme_par, xdat = x, slmgev = slm, covinv = solve(cov_mat), lcovdet = log(det(cov_mat)), mu = -0.5, std = 0.2, lme = lme_par, pen = "beta", p = 6, c1 = 10, c2 = 5)
Annual maximum daily rainfall data from Haenam, South Korea. This dataset is used for demonstrating model averaging methods for high quantile estimation in extreme value analysis.
haenamhaenam
A data frame with 52 rows and 2 columns:
Year of observation (integer, 1971-2022)
Annual maximum daily rainfall in mm (numeric)
Korea Meteorological Administration (KMA; https://www.weather.go.kr)
Shin, Y., Shin, Y., & Park, J. S. (2026). Model averaging with mixed criteria for estimating high quantiles of extreme values: Application to heavy rainfall. Stochastic Environmental Research and Risk Assessment, 40(2), 47. doi:10.1007/s00477-025-03167-x
data(haenam) head(haenam) # Estimate high quantiles using model averaging result <- ma.gev(haenam$X1, quant = c(0.98, 0.99, 0.995)) print(result$qua.ma)data(haenam) head(haenam) # Estimate high quantiles using model averaging result <- ma.gev(haenam$X1, quant = c(0.98, 0.99, 0.995)) print(result$qua.ma)
Generates multiple random starting parameter sets for multi-start optimization in GLME estimation. Uses L-moment estimates as a base and adds random perturbations.
init.glme(xdat, ntry = ntry)init.glme(xdat, ntry = ntry)
xdat |
A numeric vector of data to be fitted. |
ntry |
Number of initial parameter sets to generate. |
A matrix with ntry rows and 3 columns (location, scale, shape),
where each row is a candidate starting point for optimization.
Yonggwan Shin, Seokkap Ko, Jihong Park, Yire Shin, Jeong-Soo Park
glme.gev which uses this function internally.
data(streamflow) inits <- init.glme(streamflow$r1, ntry = 5) print(inits)data(streamflow) inits <- init.glme(streamflow$r1, ntry = 5) print(inits)
This function estimates high quantiles of the Generalized Extreme Value (GEV) distribution using model averaging with mixed criteria. It combines Maximum Likelihood Estimation (MLE) and L-moment Estimation (LME) to construct candidate submodels and assign weights effectively.
ma.gev( data = NULL, quant = c(0.98, 0.99, 0.995), weight = "like1", numk = 12, B = 200, varcom = TRUE, trim = 0, fig = FALSE, bma = FALSE, pen = "norm", CD = FALSE, remle = FALSE )ma.gev( data = NULL, quant = c(0.98, 0.99, 0.995), weight = "like1", numk = 12, B = 200, varcom = TRUE, trim = 0, fig = FALSE, bma = FALSE, pen = "norm", CD = FALSE, remle = FALSE )
data |
A numeric vector of data to be fitted (e.g., annual maxima). |
quant |
The probabilities corresponding to high quantiles to be estimated. Default is c(0.98, 0.99, 0.995). |
weight |
The weighting method name. Options are:
Variants with numbers indicate left trimming level (0, 1, or 2). |
numk |
The number of candidate submodels K. Default is 12. |
B |
The number of bootstrap samples. Default is 200. |
varcom |
Logical. Whether to compute variance of quantile estimates. Default is TRUE. |
trim |
The number of left trimming for L-moments. Usually 0 (default), 1, or 2. |
fig |
Logical. Whether to produce diagnostic plots. Default is FALSE. |
bma |
Logical. Whether to use Bayesian Model Averaging. Default is FALSE. |
pen |
Penalty type for BMA prior: 'norm' (normal, default) or 'beta'. |
CD |
Logical. Whether to compute Coles-Dixon penalized MLE. Default is FALSE. |
remle |
Logical. Whether to compute restricted MLE. Default is FALSE. |
The model averaging approach works as follows:
MLE and LME of GEV parameters are computed
K candidate shape parameters (xi) are selected from profile likelihood CI
For each candidate xi, MLE with fixed xi is computed
Weights are assigned based on the selected method
Final quantile estimates are weighted averages across submodels
The weighting schemes include:
'like': AIC-based weights using likelihood with fixed xi
'gLd': Weights based on generalized L-moment distance
'med': Weights based on median and L-moment distance
'cvt': Conventional AIC weights
When bma=TRUE, Bayesian model averaging is applied with prior specified by pen.
A list containing:
mle.hosking - MLE estimates in Hosking style (mu, sigma, xi)
qua.mle - Quantile estimates from MLE
mle.cov3 - Covariance matrix of MLE (3x3)
qua.se.mle.delta - Standard errors of MLE quantiles (delta method)
lme - L-moment estimates (mu, sigma, xi)
lme.cov3 - Covariance matrix of LME (bootstrap)
qua.lme - Quantile estimates from LME
qua.se.lme.boots - Standard errors of LME quantiles (bootstrap)
qua.ma - Model-averaged quantile estimates
w.ma - Weights used for model averaging
fixw.se.ma - Asymptotic SE under fixed weights
ranw.se.ma - Asymptotic SE under random weights
surr - Surrogate model parameters (mu, sigma, xi)
pick_xi - Selected xi values for K submodels
qua.bma - (if bma=TRUE) BMA quantile estimates
w.bma - (if bma=TRUE) BMA weights
mle.CD - (if CD=TRUE) Coles-Dixon penalized MLE
qua.CD - (if CD=TRUE) Quantile estimates from CD-MLE
remle1 - (if remle=TRUE) Restricted MLE (first constraint)
qua.remle1 - (if remle=TRUE) Quantile estimates from remle1
remle2 - (if remle=TRUE) Restricted MLE (second constraint)
qua.remle2 - (if remle=TRUE) Quantile estimates from remle2
quant - The quantile probabilities used
Yonggwan Shin, Seokkap Ko, Jihong Park, Yire Shin, Jeong-Soo Park
Shin, Y., Shin, Y., & Park, J. S. (2026). Model averaging with mixed criteria for estimating high quantiles of extreme values: Application to heavy rainfall. Stochastic Environmental Research and Risk Assessment, 40(2), 47. doi:10.1007/s00477-025-03167-x
glme.gev for stationary GLME estimation,
magev.ksensplot for K sensitivity analysis,
magev.qqplot for Q-Q diagnostic plots,
magev.rlplot for return level plots.
# Load example data data(streamflow) x <- streamflow$r1 # Basic usage with likelihood weights result <- ma.gev(x, quant = c(0.95, 0.99), weight = 'like1', B = 100) print(result$qua.ma) # Model-averaged quantiles print(result$qua.mle) # MLE quantiles for comparison print(result$qua.lme) # LME quantiles for comparison # Using generalized L-moment distance weights result2 <- ma.gev(x, quant = c(0.95, 0.99), weight = 'gLd', B = 100) print(result2$w.ma) # Model weights# Load example data data(streamflow) x <- streamflow$r1 # Basic usage with likelihood weights result <- ma.gev(x, quant = c(0.95, 0.99), weight = 'like1', B = 100) print(result$qua.ma) # Model-averaged quantiles print(result$qua.mle) # MLE quantiles for comparison print(result$qua.lme) # LME quantiles for comparison # Using generalized L-moment distance weights result2 <- ma.gev(x, quant = c(0.95, 0.99), weight = 'gLd', B = 100) print(result2$w.ma) # Model weights
Plots return level estimates, standard errors, and first-order differences across different numbers of candidate submodels K. This helps identify stable regions where estimates converge and select an optimal K value.
magev.ksensplot( data = NULL, q.cut = 0.6, mink = 4, maxk = 20, quant = c(0.99, 0.995) )magev.ksensplot( data = NULL, q.cut = 0.6, mink = 4, maxk = 20, quant = c(0.99, 0.995) )
data |
A numeric vector of data to be fitted (e.g., annual maxima). |
q.cut |
Quantile cutoff for determining stability (default 0.6). |
mink |
Minimum number of candidate submodels to test (default 4). |
maxk |
Maximum number of candidate submodels to test (default 20). |
quant |
The probabilities for high quantile estimation. Default is c(0.99, 0.995). |
The function computes MAGEV estimates for K ranging from mink to
maxk. For each K, it calculates:
Return level estimates (black points)
Normalized standard errors (blue line)
First-order differences (red line with triangles)
The optimal K is selected as the smallest value where both the normalized
standard error and first-order difference are below their respective
q.cut quantile cutoffs. The selected K is indicated by a purple
vertical line.
The optimal K value (integer) selected by the algorithm.
Yonggwan Shin, Seokkap Ko, Jihong Park, Yire Shin, Jeong-Soo Park
Shin, Y., Shin, Y., & Park, J. S. (2026). Model averaging with mixed criteria for estimating high quantiles of extreme values: Application to heavy rainfall. Stochastic Environmental Research and Risk Assessment, 40(2), 47. doi:10.1007/s00477-025-03167-x
ma.gev for the main model averaging function.
data(streamflow) optimal_k <- magev.ksensplot(streamflow$r1) print(optimal_k)data(streamflow) optimal_k <- magev.ksensplot(streamflow$r1) print(optimal_k)
Creates a 2x2 panel of Q-Q plots comparing observed vs. fitted quantiles for different estimation methods: MLE, LME, surrogate (MA), and REMLE.
magev.qqplot(data = NULL, zx = NULL)magev.qqplot(data = NULL, zx = NULL)
data |
A numeric vector of observed data. |
zx |
A list object returned by |
The function creates four Q-Q plots:
Upper left: MLE (Maximum Likelihood Estimation)
Upper right: LME (L-moment Estimation)
Lower left: Surrogate MA (Model Averaging surrogate)
Lower right: REMLE (Restricted MLE, if available)
Points close to the 45-degree diagonal line indicate good model fit.
NULL. The function produces a plot as a side effect.
Yonggwan Shin, Seokkap Ko, Jihong Park, Yire Shin, Jeong-Soo Park
Shin, Y., Shin, Y., & Park, J. S. (2026). Model averaging with mixed criteria for estimating high quantiles of extreme values: Application to heavy rainfall. Stochastic Environmental Research and Risk Assessment, 40(2), 47. doi:10.1007/s00477-025-03167-x
ma.gev for the main model averaging function,
magev.rlplot for return level plots.
data(streamflow) qq <- c(seq(0.01, 0.99, by = 0.01), 0.995, 0.999) zx <- ma.gev(streamflow$r1, quant = qq, weight = 'like1', numk = 9, varcom = FALSE, remle = TRUE) magev.qqplot(data = streamflow$r1, zx = zx)data(streamflow) qq <- c(seq(0.01, 0.99, by = 0.01), 0.995, 0.999) zx <- ma.gev(streamflow$r1, quant = qq, weight = 'like1', numk = 9, varcom = FALSE, remle = TRUE) magev.qqplot(data = streamflow$r1, zx = zx)
Displays fitted return levels with 95 return period on a log scale.
magev.rlplot(par = NULL, se.vec = NULL, data = NULL)magev.rlplot(par = NULL, se.vec = NULL, data = NULL)
par |
A numeric vector of GEV parameters (mu, sigma, xi) in Hosking style.
Typically from |
se.vec |
A numeric vector of standard errors for the quantile estimates
corresponding to the plotting positions. Typically from |
data |
A numeric vector of observed data (annual maxima). |
The plot shows:
Black line: Fitted return level curve
Blue lines: 95
Black points: Observed data at empirical return periods
The x-axis (return period) is on a log scale, ranging from 0.1 to 900 years.
NULL. The function produces a plot as a side effect.
Yonggwan Shin, Seokkap Ko, Jihong Park, Yire Shin, Jeong-Soo Park
Shin, Y., Shin, Y., & Park, J. S. (2026). Model averaging with mixed criteria for estimating high quantiles of extreme values: Application to heavy rainfall. Stochastic Environmental Research and Risk Assessment, 40(2), 47. doi:10.1007/s00477-025-03167-x
ma.gev for the main model averaging function,
magev.qqplot for Q-Q diagnostic plots.
data(streamflow) ff <- c(seq(0.01, 0.09, by = 0.01), 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 0.93, 0.95, 0.98, 0.99, 0.993, 0.995, 0.998, 0.999) zx <- ma.gev(streamflow$r1, quant = ff, weight = 'like1', numk = 9, varcom = TRUE) magev.rlplot(par = zx$surr$par, se.vec = zx$ranw.se.ma, data = streamflow$r1)data(streamflow) ff <- c(seq(0.01, 0.09, by = 0.01), 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 0.93, 0.95, 0.98, 0.99, 0.993, 0.995, 0.998, 0.999) zx <- ma.gev(streamflow$r1, quant = ff, weight = 'like1', numk = 9, varcom = TRUE) magev.rlplot(par = zx$surr$par, se.vec = zx$ranw.se.ma, data = streamflow$r1)
Computes the Martins-Stedinger Beta(6,9) prior probability for the GEV
shape parameter on the interval .
MS_pk(para = para, p = 6, q = 9)MS_pk(para = para, p = 6, q = 9)
para |
A vector of GEV parameters (location, scale, shape). |
p |
Shape parameter for beta distribution (default 6). |
q |
Shape parameter for beta distribution (default 9). |
Prior probability value (scalar).
Yonggwan Shin, Seokkap Ko, Jihong Park, Yire Shin, Jeong-Soo Park
Martins, E. S. & Stedinger, J. R. (2000). Generalized maximum-likelihood generalized extreme-value quantile estimators for hydrologic data. Water Resources Research, 36(3), 737-744. doi:10.1029/1999WR900330
pk.beta.stnary for the adaptive beta penalty,
glme.gev which uses these penalty functions.
# Evaluate MS prior at xi = -0.2 MS_pk(para = c(100, 20, -0.2))# Evaluate MS prior at xi = -0.2 MS_pk(para = c(100, 20, -0.2))
Estimates parameters of a non-stationary Generalized Extreme Value (GEV) distribution using the L-moment-based algorithm from Shin et al. (2025, J. Korean Stat. Soc.). This function combines L-moments, goodness-of-fit measures, and robust regression.
This is a convenience wrapper around glme.gev11 with pen="no",
providing compatibility with the original nsgev package interface.
nsgev(xdat, ntry = 20, ftol = 1e-06)nsgev(xdat, ntry = 20, ftol = 1e-06)
xdat |
A numeric vector of data to be fitted (e.g., annual maximum values). |
ntry |
Number of attempts for optimization (default 20). |
ftol |
Function tolerance for optimization (default 1e-6). |
A list containing:
para.prop - The proposed L-moment based estimates
(mu0, mu1, sigma0, sigma1, xi).
precis - Precision of the optimization.
Yonggwan Shin, Seokkap Ko, Jihong Park, Yire Shin, Jeong-Soo Park
Shin, Y., Shin, Y. & Park, J.-S. (2025). Building nonstationary extreme value model using L-moments. Journal of the Korean Statistical Society, 54, 947-970. doi:10.1007/s42952-025-00325-3
glme.gev11 for the full GLME method with penalty functions,
gado.prop_11 for detailed estimation results.
data(Trehafod) result <- nsgev(Trehafod$r1, ntry = 5) print(result$para.prop)data(Trehafod) result <- nsgev(Trehafod$r1, ntry = 5) print(result$para.prop)
Estimates GEV location and scale parameters from L-moments while keeping
the shape parameter fixed at a user-specified value. Modified from
lmomco::pargev().
pargev.kfix(lmom, kfix = 0.1, checklmom = TRUE, ...)pargev.kfix(lmom, kfix = 0.1, checklmom = TRUE, ...)
lmom |
L-moments object. |
kfix |
Fixed shape parameter value. |
checklmom |
Whether to check L-moment validity. |
... |
Additional arguments. |
A list with components:
Character "gev"
Numeric vector of GEV parameters (xi=location, alpha=scale, kappa=shape)
Character "pargev"
Yonggwan Shin, Seokkap Ko, Jihong Park, Yire Shin, Jeong-Soo Park
Hosking, J. R. M. (1990). L-moments: Analysis and estimation of distributions using linear combinations of order statistics. Journal of the Royal Statistical Society, Series B, 52(1), 105-124. doi:10.1111/j.2517-6161.1990.tb01775.x
glme.gev for GLME estimation,
pargev for the original L-moment GEV fitting.
data(streamflow) lmom <- lmomco::lmoms(streamflow$r1, nmom = 3) pargev.kfix(lmom, kfix = -0.1)data(streamflow) lmom <- lmomco::lmoms(streamflow$r1, nmom = 3) pargev.kfix(lmom, kfix = -0.1)
Climate or meteorological data from the Phliu Agrometeorological Station for extreme value analysis.
PhliuAgrometPhliuAgromet
A data frame with 40 rows and 9 columns:
Station identifier (character)
Year of observation (numeric, 1984-2023)
Annual maximum daily precipitation in mm (numeric)
Station name (character)
Climate zone code (character)
Station latitude in degrees (numeric)
Station longitude in degrees (numeric)
Record start year (integer)
Record end year (numeric)
Phliu Agrometeorological Station, Thailand.
Shin, Y., Shin, Y., Park, J., & Park, J. S. (2025). Generalized method of L-moment estimation for stationary and nonstationary extreme value models. arXiv preprint arXiv:2512.20385. doi:10.48550/arXiv.2512.20385
data(PhliuAgromet) head(PhliuAgromet)data(PhliuAgromet) head(PhliuAgromet)
Computes a Beta distribution-based adaptive preference (penalty) function for the GEV shape parameter. The hyperparameters are adapted based on the L-moment estimate of the shape parameter.
pk.beta.stnary( para = NULL, lme.center = NULL, p = NULL, q = NULL, c0 = 0.3, c1 = 10, c2 = 5 )pk.beta.stnary( para = NULL, lme.center = NULL, p = NULL, q = NULL, c0 = 0.3, c1 = 10, c2 = 5 )
para |
A vector of GEV parameters. |
lme.center |
L-moment estimates as center. |
p |
Shape parameter (default 6). |
q |
Shape parameter q (optional, if provided uses fixed limits). |
c0 |
Limit parameter (default 0.3). |
c1 |
Scaling parameter (default 10). |
c2 |
Upper limit parameter (default 5). |
A list containing:
Preference function value (scalar)
Shape parameter p used
Shape parameter q used
Yonggwan Shin, Seokkap Ko, Jihong Park, Yire Shin, Jeong-Soo Park
Shin, Y., Shin, Y., Park, J. & Park, J.-S. (2025). Generalized method of L-moment estimation for stationary and nonstationary extreme value models. arXiv preprint arXiv:2512.20385. doi:10.48550/arXiv.2512.20385
pk.norm.stnary for the normal penalty,
MS_pk for the Martins-Stedinger penalty,
glme.gev which uses these penalty functions.
# Beta preference for xi = -0.2 centered at LME xi = -0.15 pk.beta.stnary(para = c(100, 20, -0.2), lme.center = c(100, 20, -0.15), p = 6)# Beta preference for xi = -0.2 centered at LME xi = -0.15 pk.beta.stnary(para = c(100, 20, -0.2), lme.center = c(100, 20, -0.15), p = 6)
Computes a normal distribution-based preference (penalty) function value
for the GEV shape parameter. The alias new_pf_norm is provided
for backward compatibility.
pk.norm.stnary(para = NULL, mu = NULL, std = NULL) new_pf_norm(para = NULL, mu = NULL, std = NULL)pk.norm.stnary(para = NULL, mu = NULL, std = NULL) new_pf_norm(para = NULL, mu = NULL, std = NULL)
para |
A vector of GEV parameters. |
mu |
Mean for normal distribution. |
std |
Standard deviation for normal distribution. |
Preference function value (scalar).
Yonggwan Shin, Seokkap Ko, Jihong Park, Yire Shin, Jeong-Soo Park
Shin, Y., Shin, Y., Park, J. & Park, J.-S. (2025). Generalized method of L-moment estimation for stationary and nonstationary extreme value models. arXiv preprint arXiv:2512.20385. doi:10.48550/arXiv.2512.20385
pk.beta.stnary for the beta penalty,
MS_pk for the Martins-Stedinger penalty,
glme.gev which uses these penalty functions.
# Normal preference with mean=-0.5, sd=0.2 at xi=-0.2 pk.norm.stnary(para = c(100, 20, -0.2), mu = -0.5, std = 0.2)# Normal preference with mean=-0.5, sd=0.2 at xi=-0.2 pk.norm.stnary(para = c(100, 20, -0.2), mu = -0.5, std = 0.2)
Calculates quantiles for non-stationary GEV models including GEV11, GEV10, GEV20, and stationary GEV00.
quagev.NS(f = NULL, para = NULL, nsample = NULL, model = NULL)quagev.NS(f = NULL, para = NULL, nsample = NULL, model = NULL)
f |
Probability (or vector of probabilities) for quantile calculation. |
para |
Parameter vector. For GEV11: (mu0, mu1, sigma0, sigma1, xi). |
nsample |
Number of time points (sample size). |
model |
Model type: "gev11", "gev10", "gev20", "gev01", or "gev00"/"gev". |
A matrix of quantiles (nsample x length(f)) or a vector if f is scalar.
Yonggwan Shin, Seokkap Ko, Jihong Park, Yire Shin, Jeong-Soo Park
Shin, Y., Shin, Y., Park, J. & Park, J.-S. (2025). Generalized method of L-moment estimation for stationary and nonstationary extreme value models. arXiv preprint arXiv:2512.20385. doi:10.48550/arXiv.2512.20385
glme.gev11 for non-stationary GEV estimation,
glme.gev for stationary GEV estimation.
# GEV11 model: time-varying quantiles para <- c(84.55, 1.03, 2.91, 0.009, -0.08) # mu0, mu1, sigma0, sigma1, xi q99 <- quagev.NS(f = 0.99, para = para, nsample = 53, model = "gev11") print(q99)# GEV11 model: time-varying quantiles para <- c(84.55, 1.03, 2.91, 0.009, -0.08) # mu0, mu1, sigma0, sigma1, xi q99 <- quagev.NS(f = 0.99, para = para, nsample = 53, model = "gev11") print(q99)
Annual maximum streamflow measurements for extreme value analysis.
streamflowstreamflow
A data frame with 50 rows and 2 columns:
Year of observation (character)
Annual maximum streamflow value (numeric)
UK National River Flow Archive, Peak Flow Dataset (https://nrfa.ceh.ac.uk/data/peak-flow-dataset).
Grego, J. M., Yates, P. A., & Mai, K. (2015). Standard error estimation for mixed flood distributions with historic maxima. Environmetrics, 26(3), 229-242. doi:10.1002/env.2333
Shin, Y., Shin, Y., & Park, J. S. (2025). Building nonstationary extreme value model using L-moments. Journal of the Korean Statistical Society, 1-24. doi:10.1007/s42952-025-00325-3
data(streamflow) head(streamflow)data(streamflow) head(streamflow)
Annual maximum river flow data from the Trehafod gauging station in Wales, UK. This dataset is commonly used for demonstrating non-stationary extreme value analysis methods.
TrehafodTrehafod
A data frame with 53 rows and 2 columns:
Year of observation (integer, 1968-2021)
Annual maximum river flow in cubic meters per second (m^3/s)
UK National River Flow Archive.
Shin, Y., Shin, Y. & Park, J.-S. (2025). Building nonstationary extreme value model using L-moments. Journal of the Korean Statistical Society, 54, 947-970. doi:10.1007/s42952-025-00325-3
data(Trehafod) head(Trehafod) # Fit non-stationary GEV11 model result <- glme.gev11(Trehafod$r1, ntry = 5) print(result$para.glme)data(Trehafod) head(Trehafod) # Fit non-stationary GEV11 model result <- glme.gev11(Trehafod$r1, ntry = 5) print(result$para.glme)