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

cdfgpa

Generalized Pareto distribution


Description

Distribution function and quantile function of the generalized Pareto distribution.

Usage

cdfgpa(x, para = c(0, 1, 0))
quagpa(f, para = c(0, 1, 0))

Arguments

x

Vector of quantiles.

f

Vector of probabilities.

para

Numeric vector containing the parameters of the distribution, in the order xi, alpha, k (location, scale, shape).

Details

The generalized Pareto distribution with location parameter xi, scale parameter alpha and shape parameter k has distribution function

F(x) = 1 - exp(-y)

where

y = (-1/k) log(1-k(x-xi)/alpha) ,

with x bounded by xi+alpha/k from below if k<0 and from above if k>0, and quantile function

x(F) = xi + alpha (1 - (1-F)^k) / k .

The exponential distribution is the special case k=0. The uniform distribution is the special case k=1.

Value

cdfgpa gives the distribution function; quagpa gives the quantile function.

Note

The functions expect the distribution parameters in a vector, rather than as separate arguments as in the standard R distribution functions pnorm, qnorm, etc.

See Also

cdfexp for the exponential distribution.

cdfkap for the kappa distribution and cdfwak for the Wakeby distribution, which generalize the generalized Pareto distribution.

Examples

# Random sample from the generalized Pareto distribution
# with parameters xi=0, alpha=1, k=-0.5.
quagpa(runif(100), c(0,1,-0.5))

lmom

L-Moments

v2.8
Common Public License Version 1.0
Authors
J. R. M. Hosking
Initial release
2019-03-11

We don't support your browser anymore

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