environmentaltools.temporal.lmom_genpareto

environmentaltools.temporal.lmom_genpareto(data, tr, nyears)[source]

Fit Generalized Pareto Distribution using L-moments with diagnostic metrics.

Estimates GPD parameters via L-moments and computes return period values along with additional diagnostic statistics for POT analysis.

Parameters:
  • data (array-like) – Peak over threshold data (exceedances)

  • tr (array-like) – Return periods in years to evaluate

  • nyears (int) – Number of years in the dataset

Returns:

Array containing [k, mu, sig, mrlp, sigmodif, nu, qtr_1, qtr_2, …]

  • kfloat

    Shape parameter

  • mufloat

    Location parameter (threshold)

  • sigfloat

    Scale parameter

  • mrlpfloat

    Mean residual life plot value: E[X - mu | X > mu]

  • sigmodiffloat

    Modified scale: sig - k*mu

  • nufloat

    Average number of exceedances per year

  • qtr_ifloat

    Return level for return period tr[i]

Return type:

np.ndarray

Notes

For peaks over threshold analysis with GPD:

  • Return levels: x_T = μ + (σ/ξ)[(Tλ)^ξ - 1]

  • Mean excess: E[X-u|X>u] = (σ + ξu)/(1-ξ)

The modified scale parameter is used in some POT formulations.

Examples

>>> data = np.random.exponential(2.0, 100)
>>> tr = np.array([10, 50, 100])
>>> results = lmom_genpareto(data, tr, nyears=10)
>>> k, mu, sig = results[0], results[1], results[2]