Simulates from the prior distribution for GEV parameters proposed in Coles and Tawn (1996), based on independent gamma priors for differences between quantiles.
rprior_quant(n, prob, shape, scale, lb = NULL, lb_prob = 0.001)
A numeric scalar. The size of sample required.
A numeric vector of length 3. Exceedance probabilities
corresponding to the quantiles used to specify the prior distribution.
The values should decrease with the index of the vector.
If not, the values in prob
will be sorted into decreasing order
without warning.
A numeric vector of length 3. Respective shape parameters of the gamma priors for the quantile differences.
A numeric vector of length 3. Respective scale parameters of the gamma priors for the quantile differences.
A numeric scalar. If this is not NULL
then the simulation
is constrained so that lb
is an approximate lower bound on the
GEV variable. Specifically, only simulated GEV parameter values for
which the 100lb_prob
% quantile is greater than lb
are
retained.
A numeric scalar. The non-exceedance probability involved
in the specification of lb
. Must be in (0,1). If lb=NULL
then lb_prob
is not used.
An n
by 3 numeric matrix.
The simulation is based on the way that the prior is constructed.
See Coles and Tawn (1996), Stephenson (2016) or the evdbayes user guide
for details of the construction of the prior. First, the quantile
differences are simulated from the specified gamma distributions.
Then the simulated quantiles are calculated. Then the GEV location,
scale and shape parameters that give these quantile values are found,
by solving numerically a set of three non-linear equations in which the
GEV quantile function evaluated at the values in prob
is equated
to the simulated quantiles. This is reduced to a one-dimensional
optimisation over the GEV shape parameter.
Coles, S. G. and Tawn, J. A. (1996) A Bayesian analysis of extreme rainfall data. Appl. Statist., 45, 463-478.
Stephenson, A. 2016. Bayesian Inference for Extreme Value Modelling. In Extreme Value Modeling and Risk Analysis: Methods and Applications, edited by D. K. Dey and J. Yan, 257-80. London: Chapman and Hall. doi:10.1201/b19721
rpost
and rpost_rcpp
for sampling
from an extreme value posterior distribution.