Learn R Programming

lfstat (version 0.9.4)

ev_return_period: Estimate the return period for given quantiles

Description

For discharges of interrest,

Usage

ev_return_period(x, fit)

Arguments

x
numeric vector containting the quantiles
fit
object of class evfit describing the underlying distribution, possibly created with evfit().

Value

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