quantile_to_gev {revdbayes} | R Documentation |
Converts quantiles to GEV parameters
Description
Three quantiles, that is, the value of quantile and their respective exceedance probabilities, are provided. This function attempts to find the location, scale and shape parameters of a GEV distribution that has these quantiles.
Usage
quantile_to_gev(quant, prob)
Arguments
quant |
A numeric vector of length 3. Values of the quantiles.
The values should increase with the index of the vector.
If not, the values in |
prob |
A numeric vector of length 3. Exceedance probabilities
corresponding to the quantiles in |
Details
Suppose that is the distribution function of
a GEV(
) distribution. This function attempts to
solve numerically the set of three non-linear equations
where are the quantiles in
quant
and
are the exceedance probabilities in
prob
.
This is reduced to a one-dimensional optimisation over the GEV
shape parameter.
Value
A numeric vector of length 3 containing the GEV location, scale and shape parameters.
See Also
rprior_quant
for simulation of GEV parameters from
a prior constructed on the quantile scale.
Examples
my_q <- c(15, 20, 22.5)
my_p <- 1-c(0.5, 0.9, 0.5^0.01)
x <- quantile_to_gev(quant = my_q, prob = my_p)
# Check
qgev(p = 1 - my_p, loc = x[1], scale = x[2], shape = x[3])