GP {distributions3}R Documentation

Create a Generalised Pareto (GP) distribution

Description

The GP distribution has a link to the ⁠\link{GEV}⁠ distribution. Suppose that the maximum of nn i.i.d. random variables has approximately a GEV distribution. For a sufficiently large threshold uu, the conditional distribution of the amount (the threshold excess) by which a variable exceeds uu given that it exceeds uu has approximately a GP distribution. Therefore, the GP distribution is often used to model the threshold excesses of a high threshold uu. The requirement that the variables are independent can be relaxed substantially, but then exceedances of uu may cluster.

Usage

GP(mu = 0, sigma = 1, xi = 0)

Arguments

mu

The location parameter, written μ\mu in textbooks. mu can be any real number. Defaults to 0.

sigma

The scale parameter, written σ\sigma in textbooks. sigma can be any positive number. Defaults to 1.

xi

The shape parameter, written ξ\xi in textbooks. xi can be any real number. Defaults to 0, which corresponds to a Gumbel distribution.

Details

We recommend reading this documentation on https://alexpghayes.github.io/distributions3/, where the math will render with additional detail and much greater clarity.

In the following, let XX be a GP random variable with location parameter mu = μ\mu, scale parameter sigma = σ\sigma and shape parameter xi = ξ\xi.

Support: [μ,μσ/ξ][\mu, \mu - \sigma / \xi] for ξ<0\xi < 0; [μ,)[\mu, \infty) for ξ0\xi \geq 0.

Mean: μ+σ/(1ξ)\mu + \sigma/(1 - \xi) for ξ<1\xi < 1; undefined otherwise.

Median: μ+σ[2ξ1]/ξ\mu + \sigma[2 ^ \xi - 1]/\xi for ξ0\xi \neq 0; μ+σln2\mu + \sigma\ln 2 for ξ=0\xi = 0.

Variance: σ2/(1ξ)2(12ξ)\sigma^2 / (1 - \xi)^2 (1 - 2\xi) for ξ<1/2\xi < 1 / 2; undefined otherwise.

Probability density function (p.d.f):

If ξ0\xi \neq 0 then

f(x)=σ1[1+ξ(xμ)/σ](1+1/ξ)f(x) = \sigma^{-1} [1 + \xi (x - \mu) / \sigma] ^ {-(1 + 1/\xi)}

for 1+ξ(xμ)/σ>01 + \xi (x - \mu) / \sigma > 0. The p.d.f. is 0 outside the support.

In the ξ=0\xi = 0 special case

f(x)=σ1exp[(xμ)/σ]f(x) = \sigma ^ {-1} \exp[-(x - \mu) / \sigma]

for xx in [μ,\mu, \infty). The p.d.f. is 0 outside the support.

Cumulative distribution function (c.d.f):

If ξ0\xi \neq 0 then

F(x)=1exp{[1+ξ(xμ)/σ]1/ξ}F(x) = 1 - \exp\{-[1 + \xi (x - \mu) / \sigma] ^ {-1/\xi} \}

for 1+ξ(xμ)/σ>01 + \xi (x - \mu) / \sigma > 0. The c.d.f. is 0 below the support and 1 above the support.

In the ξ=0\xi = 0 special case

F(x)=1exp[(xμ)/σ]}F(x) = 1 - \exp[-(x - \mu) / \sigma] \}

for xx in RR, the set of all real numbers.

Value

A GP object.

See Also

Other continuous distributions: Beta(), Cauchy(), ChiSquare(), Erlang(), Exponential(), FisherF(), Frechet(), GEV(), Gamma(), Gumbel(), LogNormal(), Logistic(), Normal(), RevWeibull(), StudentsT(), Tukey(), Uniform(), Weibull()

Examples


set.seed(27)

X <- GP(0, 2, 0.1)
X

random(X, 10)

pdf(X, 0.7)
log_pdf(X, 0.7)

cdf(X, 0.7)
quantile(X, 0.7)

cdf(X, quantile(X, 0.7))
quantile(X, cdf(X, 0.7))

[Package distributions3 version 0.2.1 Index]