ev_return_period: Estimate the return period for given quantiles

View source: R/5extreme.R

ev_return_periodR Documentation

Estimate the return period for given quantiles

Description

For discharges of interest, estimate the corresponding return period.

Usage

ev_return_period(x, fit)

Arguments

x

numeric vector containing the quantiles

fit

object of class evfit describing the underlying distribution, possibly created with evfit().

Value

a numeric vector of return periods.

See Also

evfit

Examples

data("ngaruroro")
ng <- as.xts(ngaruroro)

# yearly minima
minima <- apply.yearly(ng$discharge, min, na.rm = TRUE)

# fit a Weibull distribution
fit <- evfit(x = as.vector(minima), distribution = "wei")

# compute return periods
minima$rp <- round(ev_return_period(minima, fit), 2)

print(minima)
plot(discharge ~ rp, data = minima,
     xlab = "Flow in m^3/s", ylab = "Return period in years")

lfstat documentation built on Nov. 10, 2022, 5:42 p.m.