GPD {mistr} | R Documentation |
The Generalized Pareto Distribution
Description
Density, distribution function, quantile function and random generation for the generalized Pareto distribution with location, scale and shape parameters.
Usage
dGPD(x, loc = 0, scale = 1, shape = 0, log = FALSE)
pGPD(q, loc = 0, scale = 1, shape = 0, lower.tail = TRUE, log.p = FALSE)
qGPD(p, loc = 0, scale = 1, shape = 0, lower.tail = TRUE, log.p = FALSE)
rGPD(n, loc = 0, scale = 1, shape = 0)
Arguments
x , q |
vector of quantiles. |
loc |
location parameter. |
scale |
scale parameter. |
shape |
shape parameter. |
log , log.p |
logical; if TRUE, probabilities |
lower.tail |
logical; if TRUE, probabilities are |
p |
vector of probabilities. |
n |
number of observations. |
Details
The generalized Pareto distribution function with location parameter , scale parameter
and shape parameter
has density given by
for and
,
or
and
,
where
. In the case where
, the density is equal to
for
.
The cumulative distribution function is
for and
,
or
and
,
with
as stated above. If
the CDF has form
.
See https://en.wikipedia.org/wiki/Generalized_Pareto_distribution for more details.
Value
dGPD
gives the density, pGPD
gives the distribution function, qGPD
gives the quantile function, and
rGPD
generates random deviates.
Invalid arguments will result in return value NaN, with a warning.
See Also
Examples
dGPD(seq(1, 5), 0, 1, 1)
qGPD(pGPD(seq(1, 5), 0, 1, 1), 0, 1 ,1)
rGPD(5, 0, 1, 1)