Skip to contents

Find the vector of the three GEV parameters corresponding to a vector of three quantiles for three given distinct probabilities.

Usage

quant2GEV(q, p, lower.tail = TRUE, plot = FALSE, eps = 1e-07, trace = 0)

Arguments

q

A numeric vector with length \(3\) containing distinct values for the GEV quantiles.

p

A numeric vector with length \(3\) containing distinct values for the probabilities.

lower.tail

Logical. If TRUE the values in p are for the probability of exceedance, else they are for the probability of non-exceedance.

plot

Logical. If TRUE a simple plot will illustrate the zero-finding used to find the GEV shape \(\xi\).

eps

A small numeric number used to decide when the shape \(xi\) is close enough to zero.

trace

Integer level of verbosity.

Value

A named numeric vector containing the GEV parameters.

Details

Given three distinct probabilities, there is a one-to-one correspondance between the vector of the three corresponding quantiles and the vector of the three GEV parameters so the vector of quantiles can be used to re-parameterise the GEV distribution. The quantile parameterisation can be preferred to define informative priors based on expert knowledge, see Coles and Tawn.

References

Coles S. and Tawn J. (1996). A Bayesian Analysis of Extreme Rainfall Data Appl. Statist. 45 (4), pp. 463-478.

Examples


co <- quant2GEV(p = c(0.1, 0.01, 0.001),
                q = c(60, 80, 120), lower.tail = FALSE)

## check the result
nieve::qGEV(p = c(0.1, 0.01, 0.001),
            loc = co["loc"], scale = co["scale"], shape = co["shape"],
            lower.tail = FALSE)
#> [1]  60.0000  80.0000 120.0027