Nothing
#' @rdname dgpd
#' @export
qgpd <-
function(p , sigma, xi, u = 0, lower.tail=TRUE, log.p=FALSE){
## this code is trickier than it looks.
## we use G ~ (exp(xi E) - 1) / xi
## there's no argument checking in qexp, so we do this to match the
## (erroneous) existing behaviour
if (length(log.p) > 1){
stop("log.p must have length 1")
} else if ((!log.p)){
if (any((p < 0) | any(p > 1))) {
stop("p must lie between 0 and 1 if log.p=FALSE")
}
}
## get the quantiles of the standard exponential
exp.quantiles <- qexp(p, lower.tail=lower.tail, log.p=log.p)
## transform to quantiles of standard gpd
## this works for negative xi because we get two sign flips
standard.gpd <- .exprel(exp.quantiles * xi) * exp.quantiles
## and transform to our gpd.
u + sigma * standard.gpd
}
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.