Learn R Programming

lfstat (version 0.9.12)

ev_return_period: Estimate the return period for given quantiles

Description

For discharges of interest, estimate the corresponding return period.

Usage

ev_return_period(x, fit)

Value

a numeric vector of return periods.

Arguments

x

numeric vector containing the quantiles

fit

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

See Also

evfit

Examples

Run this code
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")

Run the code above in your browser using DataLab