GPD | R Documentation |
Density, distribution function, quantile function and random variate generation for the (generalized) Pareto distribution (GPD).
dGPD(x, shape, scale, log = FALSE)
pGPD(q, shape, scale, lower.tail = TRUE, log.p = FALSE)
qGPD(p, shape, scale, lower.tail = TRUE, log.p = FALSE)
rGPD(n, shape, scale)
dPar(x, shape, scale = 1, log = FALSE)
pPar(q, shape, scale = 1, lower.tail = TRUE, log.p = FALSE)
qPar(p, shape, scale = 1, lower.tail = TRUE, log.p = FALSE)
rPar(n, shape, scale = 1)
x , q |
vector of quantiles. |
p |
vector of probabilities. |
n |
number of observations. |
shape |
GPD shape parameter |
scale |
GPD scale parameter |
lower.tail |
|
log , log.p |
logical; if |
The distribution function of the generalized Pareto distribution is given by
F(x) = \left\{ \begin{array}{ll}
1-(1+\xi x/\beta)^{-1/\xi}, & \xi \neq 0,\\
1-\exp(-x/\beta), & \xi = 0,
\end{array}\right.
where \beta>0
and x\ge0
if \xi\ge
0
and x\in[0,-\beta/\xi]
if \xi<0
.
The distribution function of the Pareto distribution is given by
F(x) = 1-(1+x/\kappa)^{-\theta},\ x\ge 0,
where \theta > 0
, \kappa > 0
.
In contrast to dGPD()
, pGPD()
, qGPD()
and
rGPD()
, the functions dPar()
, pPar()
,
qPar()
and rPar()
are vectorized in their main
argument and the parameters.
dGPD()
computes the density, pGPD()
the distribution
function, qGPD()
the quantile function and rGPD()
random
variates of the generalized Pareto distribution.
Similary for dPar()
, pPar()
, qPar()
and
rPar()
for the Pareto distribution.
Marius Hofert
McNeil, A. J., Frey, R., and Embrechts, P. (2015). Quantitative Risk Management: Concepts, Techniques, Tools. Princeton University Press.
## Basic sanity checks
curve(dGPD(x, shape = 0.5, scale = 3), from = -1, to = 5)
plot(pGPD(rGPD(1000, shape = 0.5, scale = 3), shape = 0.5, scale = 3)) # should be U[0,1]
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.