Description Usage Arguments Details References Examples
Density, distribution function, quantile function and random number generation for the Generalized Pareto distribution with location, scale, and shape parameters.
1 2 3 4 5 6 7 |
x |
Vector of observations. |
loc, scale, shape |
Location, scale, and shape parameters. Can be vectors, but the lengths must be appropriate. |
log.d |
Logical; if TRUE, the log density is returned. |
n |
Number of observations. |
p |
Vector of probabilities. |
lower.tail |
Logical; if TRUE (default), probabilities are P[X <= x], otherwise, P[X > x]. |
log.p |
Logical; if TRUE, probabilities p are given as log(p). |
q |
Vector of quantiles. |
The Generalized Pareto distribution function is given (Pickands, 1975) by
H(y) = 1 - \Big[1 + \frac{ξ (y - μ)}{σ}\Big]^{-1/ξ}
defined on \{y : y > 0, (1 + ξ (y - μ) / σ) > 0 \}, with location μ, scale σ > 0, and shape parameter ξ.
Pickands III, J. (1975). Statistical inference using extreme order statistics. Annals of Statistics, 119-131.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | dgpd(2:4, 1, 0.5, 0.01)
dgpd(2, -2:1, 0.5, 0.01)
pgpd(2:4, 1, 0.5, 0.01)
qgpd(seq(0.9, 0.6, -0.1), 2, 0.5, 0.01)
rgpd(6, 1, 0.5, 0.01)
# Generate sample with linear trend in location parameter
rgpd(6, 1:6, 0.5, 0.01)
# Generate sample with linear trend in location and scale parameter
rgpd(6, 1:6, seq(0.5, 3, 0.5), 0.01)
p <- (1:9)/10
pgpd(qgpd(p, 1, 2, 0.8), 1, 2, 0.8)
# Incorrect syntax (parameter vectors are of different lengths other than 1)
## Not run:
rgpd(1, 1:8, 1:5, 0)
rgpd(10, 1:8, 1, 0.01)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.