Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

GPD

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 p are given as log(p), default: FALSE.

lower.tail

logical; if TRUE, probabilities are P[X ≤ x] otherwise, P[X > x], default: TRUE.

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

f(x)=1/σ (1 + ξ z)^-(1/ξ + 1)

for x≥ μ and ξ> 0, or μ-σ/ξ ≥ x≥ μ and ξ< 0, where z=(x-μ)/σ. In the case where ξ= 0, the density is equal to f(x)=1/σ e^-z for x≥ μ. The cumulative distribution function is

F(x)=1-(1+ξ z)^(-1/ξ)

for x≥ μ and ξ> 0, or μ-σ/ξ ≥ x≥ μ and ξ< 0, with z as stated above. If ξ= 0 the CDF has form F(x)=1-e^-z.

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)

mistr

Mixture and Composite Distributions

v0.0.4
GPL-3
Authors
Lukas Sablica [aut, cre] (<https://orcid.org/0000-0001-9166-4563>), Kurt Hornik [aut] (<https://orcid.org/0000-0003-4198-9911>)
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.