Package 'GLmom'

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

Help Index


Bangkok Maximum Rainfall Data

Description

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.

Usage

bangkok

Format

A data frame with 58 rows and 5 columns:

X1

Annual maximum daily rainfall in mm (numeric)

X2

2nd largest annual daily rainfall in mm (numeric)

X3

3rd largest annual daily rainfall in mm (numeric)

X4

4th largest annual daily rainfall in mm (numeric)

X5

5th largest annual daily rainfall in mm (numeric)

Source

Thai Meteorological Department (TMD; https://www.tmd.go.th)

References

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

Examples

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)

Comprehensive Non-stationary GEV Estimation

Description

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.

Usage

gado.prop_11(xdat, ntry = 20, ftol = 1e-06)

Arguments

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).

Value

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.

Author(s)

Yonggwan Shin, Seokkap Ko, Jihong Park, Yire Shin, Jeong-Soo Park

References

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

See Also

glme.gev11 for the full GLME method with penalty functions, nsgev for the simple interface.

Examples

data(Trehafod)
result <- gado.prop_11(Trehafod$r1, ntry = 5)
print(result$para.prop)
print(result$lme.sta)

Generalized L-moments estimation for generalized extreme value distribution

Description

This function estimates the Generalized L-moments of Generalized Extreme Value distribution.

Usage

glme.gev(
  xdat,
  ntry = 10,
  pen = "beta",
  pen.choice = NULL,
  mu = -0.5,
  std = 0.2,
  p = 6,
  c1 = 10,
  c2 = 5
)

Arguments

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).

Details

The equations for the L-moments for LME of the GEVD are

λl=0,\underline{\bf \lambda} - \underline{\bf l} = \underline{\bf 0},

where λ=(λ1,  λ2,  λ3)t\underline{\bf \lambda} =(\lambda_1,\; \lambda_2,\; \lambda_3)^t and l=(l1,  l2,  l3)t\underline{\bf l} =(l_1,\; l_2,\; l_3)^t. Next, we define the generalized L-moments distance (GLD) as;

(λl)tV1(λl),(\underline{\bf \lambda} -\underline{\bf l})^t V^{-1} (\underline{\bf \lambda} -\underline{\bf l}),

where VV is the variance-covariance matrix of the sample L-moments up to the third order.

Value

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.

Author(s)

Yonggwan Shin, Seokkap Ko, Jihong Park, Yire Shin, Jeong-Soo Park

References

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

See Also

glme.gev11 for non-stationary GEV estimation, ma.gev for model averaging estimation, glme.like for the objective function, quagev.NS for quantile computation.

Examples

# 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)

Generalized L-moments estimation for non-stationary GEV11 model

Description

This function estimates parameters of the non-stationary GEV11 model where mu(t) = mu0 + mu1*t and sigma(t) = exp(sigma0 + sigma1*t).

Usage

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
)

Arguments

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).

Value

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.

Author(s)

Yonggwan Shin, Seokkap Ko, Jihong Park, Yire Shin, Jeong-Soo Park

References

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

See Also

glme.gev for stationary GEV estimation, nsgev for the pure L-moment wrapper (no penalty), quagev.NS for non-stationary quantile computation.

Examples

# 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

Calculate the likelihood for Generalized L-moments estimation of GEV distribution

Description

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.

Usage

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
)

Arguments

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.

Details

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.

Value

A numeric value representing the penalized negative log-likelihood. A lower value indicates a better fit.

Author(s)

Yonggwan Shin, Seokkap Ko, Jihong Park, Yire Shin, Jeong-Soo Park

References

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

See Also

glme.gev which calls this function for optimization.

Examples

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)

Haenam Maximum Rainfall Data

Description

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.

Usage

haenam

Format

A data frame with 52 rows and 2 columns:

year

Year of observation (integer, 1971-2022)

X1

Annual maximum daily rainfall in mm (numeric)

Source

Korea Meteorological Administration (KMA; https://www.weather.go.kr)

References

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

Examples

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)

Initialize random starting values for GLME optimization

Description

Generates multiple random starting parameter sets for multi-start optimization in GLME estimation. Uses L-moment estimates as a base and adds random perturbations.

Usage

init.glme(xdat, ntry = ntry)

Arguments

xdat

A numeric vector of data to be fitted.

ntry

Number of initial parameter sets to generate.

Value

A matrix with ntry rows and 3 columns (location, scale, shape), where each row is a candidate starting point for optimization.

Author(s)

Yonggwan Shin, Seokkap Ko, Jihong Park, Yire Shin, Jeong-Soo Park

See Also

glme.gev which uses this function internally.

Examples

data(streamflow)
inits <- init.glme(streamflow$r1, ntry = 5)
print(inits)

Model Averaging for GEV High Quantile Estimation

Description

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.

Usage

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
)

Arguments

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:

  • 'like', 'like0', 'like1' (default): Likelihood-based weights (AIC)

  • 'gLd', 'gLd0', 'gLd1', 'gLd2': Generalized L-moment distance weights

  • 'med', 'med1', 'med2': Median-based weights

  • 'cvt': Conventional AIC weights

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.

Details

The model averaging approach works as follows:

  1. MLE and LME of GEV parameters are computed

  2. K candidate shape parameters (xi) are selected from profile likelihood CI

  3. For each candidate xi, MLE with fixed xi is computed

  4. Weights are assigned based on the selected method

  5. 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.

Value

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

Author(s)

Yonggwan Shin, Seokkap Ko, Jihong Park, Yire Shin, Jeong-Soo Park

References

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

See Also

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.

Examples

# 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

K Sensitivity Plot for MAGEV

Description

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.

Usage

magev.ksensplot(
  data = NULL,
  q.cut = 0.6,
  mink = 4,
  maxk = 20,
  quant = c(0.99, 0.995)
)

Arguments

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).

Details

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.

Value

The optimal K value (integer) selected by the algorithm.

Author(s)

Yonggwan Shin, Seokkap Ko, Jihong Park, Yire Shin, Jeong-Soo Park

References

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

See Also

ma.gev for the main model averaging function.

Examples

data(streamflow)
optimal_k <- magev.ksensplot(streamflow$r1)
print(optimal_k)

Q-Q Diagnostic Plot for MAGEV

Description

Creates a 2x2 panel of Q-Q plots comparing observed vs. fitted quantiles for different estimation methods: MLE, LME, surrogate (MA), and REMLE.

Usage

magev.qqplot(data = NULL, zx = NULL)

Arguments

data

A numeric vector of observed data.

zx

A list object returned by ma.gev with remle = TRUE.

Details

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.

Value

NULL. The function produces a plot as a side effect.

Author(s)

Yonggwan Shin, Seokkap Ko, Jihong Park, Yire Shin, Jeong-Soo Park

References

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

See Also

ma.gev for the main model averaging function, magev.rlplot for return level plots.

Examples

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)

Return Level Plot for MAGEV

Description

Displays fitted return levels with 95 return period on a log scale.

Usage

magev.rlplot(par = NULL, se.vec = NULL, data = NULL)

Arguments

par

A numeric vector of GEV parameters (mu, sigma, xi) in Hosking style. Typically from zx$surr$par where zx is the output of ma.gev.

se.vec

A numeric vector of standard errors for the quantile estimates corresponding to the plotting positions. Typically from zx$ranw.se.ma.

data

A numeric vector of observed data (annual maxima).

Details

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.

Value

NULL. The function produces a plot as a side effect.

Author(s)

Yonggwan Shin, Seokkap Ko, Jihong Park, Yire Shin, Jeong-Soo Park

References

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

See Also

ma.gev for the main model averaging function, magev.qqplot for Q-Q diagnostic plots.

Examples

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)

Martins-Stedinger prior function

Description

Computes the Martins-Stedinger Beta(6,9) prior probability for the GEV shape parameter on the interval [0.5,0.5][-0.5, 0.5].

Usage

MS_pk(para = para, p = 6, q = 9)

Arguments

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).

Value

Prior probability value (scalar).

Author(s)

Yonggwan Shin, Seokkap Ko, Jihong Park, Yire Shin, Jeong-Soo Park

References

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

See Also

pk.beta.stnary for the adaptive beta penalty, glme.gev which uses these penalty functions.

Examples

# Evaluate MS prior at xi = -0.2
MS_pk(para = c(100, 20, -0.2))

Non-stationary GEV Parameter Estimation

Description

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.

Usage

nsgev(xdat, ntry = 20, ftol = 1e-06)

Arguments

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).

Value

A list containing:

  • para.prop - The proposed L-moment based estimates (mu0, mu1, sigma0, sigma1, xi).

  • precis - Precision of the optimization.

Author(s)

Yonggwan Shin, Seokkap Ko, Jihong Park, Yire Shin, Jeong-Soo Park

References

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

See Also

glme.gev11 for the full GLME method with penalty functions, gado.prop_11 for detailed estimation results.

Examples

data(Trehafod)
result <- nsgev(Trehafod$r1, ntry = 5)
print(result$para.prop)

GEV parameter estimation with fixed shape parameter

Description

Estimates GEV location and scale parameters from L-moments while keeping the shape parameter fixed at a user-specified value. Modified from lmomco::pargev().

Usage

pargev.kfix(lmom, kfix = 0.1, checklmom = TRUE, ...)

Arguments

lmom

L-moments object.

kfix

Fixed shape parameter value.

checklmom

Whether to check L-moment validity.

...

Additional arguments.

Value

A list with components:

type

Character "gev"

para

Numeric vector of GEV parameters (xi=location, alpha=scale, kappa=shape)

source

Character "pargev"

Author(s)

Yonggwan Shin, Seokkap Ko, Jihong Park, Yire Shin, Jeong-Soo Park

References

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

See Also

glme.gev for GLME estimation, pargev for the original L-moment GEV fitting.

Examples

data(streamflow)
lmom <- lmomco::lmoms(streamflow$r1, nmom = 3)
pargev.kfix(lmom, kfix = -0.1)

Phliu Agrometeorological Station Data

Description

Climate or meteorological data from the Phliu Agrometeorological Station for extreme value analysis.

Usage

PhliuAgromet

Format

A data frame with 40 rows and 9 columns:

Station.ID

Station identifier (character)

year

Year of observation (numeric, 1984-2023)

prec

Annual maximum daily precipitation in mm (numeric)

Name

Station name (character)

zone

Climate zone code (character)

latitude

Station latitude in degrees (numeric)

longitude

Station longitude in degrees (numeric)

Starting.year

Record start year (integer)

Ending.year

Record end year (numeric)

Source

Phliu Agrometeorological Station, Thailand.

References

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

Examples

data(PhliuAgromet)
head(PhliuAgromet)

Beta preference function for stationary GEV

Description

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.

Usage

pk.beta.stnary(
  para = NULL,
  lme.center = NULL,
  p = NULL,
  q = NULL,
  c0 = 0.3,
  c1 = 10,
  c2 = 5
)

Arguments

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).

Value

A list containing:

pk.one

Preference function value (scalar)

p

Shape parameter p used

q

Shape parameter q used

Author(s)

Yonggwan Shin, Seokkap Ko, Jihong Park, Yire Shin, Jeong-Soo Park

References

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

See Also

pk.norm.stnary for the normal penalty, MS_pk for the Martins-Stedinger penalty, glme.gev which uses these penalty functions.

Examples

# 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)

Normal preference function for shape parameter (stationary GEV)

Description

Computes a normal distribution-based preference (penalty) function value for the GEV shape parameter. The alias new_pf_norm is provided for backward compatibility.

Usage

pk.norm.stnary(para = NULL, mu = NULL, std = NULL)

new_pf_norm(para = NULL, mu = NULL, std = NULL)

Arguments

para

A vector of GEV parameters.

mu

Mean for normal distribution.

std

Standard deviation for normal distribution.

Value

Preference function value (scalar).

Author(s)

Yonggwan Shin, Seokkap Ko, Jihong Park, Yire Shin, Jeong-Soo Park

References

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

See Also

pk.beta.stnary for the beta penalty, MS_pk for the Martins-Stedinger penalty, glme.gev which uses these penalty functions.

Examples

# 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)

Quantile function for non-stationary GEV models

Description

Calculates quantiles for non-stationary GEV models including GEV11, GEV10, GEV20, and stationary GEV00.

Usage

quagev.NS(f = NULL, para = NULL, nsample = NULL, model = NULL)

Arguments

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".

Value

A matrix of quantiles (nsample x length(f)) or a vector if f is scalar.

Author(s)

Yonggwan Shin, Seokkap Ko, Jihong Park, Yire Shin, Jeong-Soo Park

References

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

See Also

glme.gev11 for non-stationary GEV estimation, glme.gev for stationary GEV estimation.

Examples

# 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)

Streamflow Data

Description

Annual maximum streamflow measurements for extreme value analysis.

Usage

streamflow

Format

A data frame with 50 rows and 2 columns:

Year

Year of observation (character)

r1

Annual maximum streamflow value (numeric)

Source

UK National River Flow Archive, Peak Flow Dataset (https://nrfa.ceh.ac.uk/data/peak-flow-dataset).

References

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

Examples

data(streamflow)
head(streamflow)

Trehafod River Flow Data

Description

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.

Usage

Trehafod

Format

A data frame with 53 rows and 2 columns:

Year

Year of observation (integer, 1968-2021)

r1

Annual maximum river flow in cubic meters per second (m^3/s)

Source

UK National River Flow Archive.

References

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

Examples

data(Trehafod)
head(Trehafod)


# Fit non-stationary GEV11 model
result <- glme.gev11(Trehafod$r1, ntry = 5)
print(result$para.glme)