View source: R/probability_tools.R
| return_level | R Documentation |
Computes return levels (quantiles) corresponding to specified return periods
from the best-fit distribution in a fitverse object. Return levels
are widely used in hydrology, climatology, and actuarial science to
characterise the magnitude of rare events.
return_level(fit,
return_periods = c(2, 5, 10, 20, 50, 100, 200, 500))
fit |
An object of class |
return_periods |
Numeric vector of return periods (in years, or whichever time unit the
data represent). Must be |
A T-year return level x_T is the value that is exceeded on average
once every T years (or time units), i.e.:
P(X > x_T) = \frac{1}{T}
x_T = F^{-1}\!\left(1 - \frac{1}{T}\right)
where F^{-1} is the quantile function of the fitted distribution.
Quantiles are computed using qfitverse(), which resolves
the quantile function from the internal distribution registry.
A data frame with one row per return period and columns:
TNumeric: the return period.
exceedance_probNumeric: 1/T, the annual exceedance
probability.
return_levelNumeric: the estimated T-year return level
(upper 1/T quantile of the fitted distribution).
Karuna G. Reddy karuna.reddy@auckland.ac.nz
M. G. M. Khan mgm.khan@usp.ac.fj
Coles, S. (2001). An Introduction to Statistical Modeling of Extreme Values. Springer, London.
Katz, R. W., Parlange, M. B. and Naveau, P. (2002). Statistics of extremes in hydrology. Advances in Water Resources, 25(8-12), 1287–1304.
qfitverse for quantiles at arbitrary probabilities.
bootstrap_ci for confidence intervals on return levels.
# Flood frequency analysis with GEV distribution
set.seed(10)
floods <- evd::rgev(80, loc = 200, scale = 40, shape = 0.15)
fit <- fitverse(floods,
dists = c("gev", "gumbel", "lognormal"),
method = "MLE",
xlab = "Annual maximum flood (m3/s)",
plot = FALSE,
verbose = FALSE)
rl <- return_level(fit)
print(rl)
# 100-year return level
rl[rl$T == 100, "return_level"]
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.