cdfgev: Generalized extreme-value distribution

View source: R/lmom.r

cdfgevR Documentation

Generalized extreme-value distribution

Description

Distribution function and quantile function of the generalized extreme-value distribution.

Usage

cdfgev(x, para = c(0, 1, 0))
quagev(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 extreme-value distribution with location parameter \xi, scale parameter \alpha and shape parameter k has distribution function

F(x)=\exp\lbrace-\exp(-y)\rbrace

where

y=-k^{-1}\log\lbrace1-k(x-\xi)/\alpha\rbrace,

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\over k}\lbrace1-(-\log F)^k\rbrace.

Extreme-value distribution types I, II and III (Gumbel, Frechet, Weibull) correspond to shape parameter values k=0, k<0 and k>0 respectively.

Value

cdfgev gives the distribution function; quagev 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.

Two parametrizations of the generalized extreme-value distribution are in common use. When Jenkinson (1955) introduced the distribution he wrote the distribution function in the form

F(x) = \exp [ - \lbrace 1 - k ( x - \xi ) / \alpha) \rbrace^{1/k}].

and that is the form used in R package lmom. A slight inconvenience with it is that the skewness of the distribution is a decreasing function of the shape parameter k. Perhaps for this reason, authors of some other R packages prefer a form in which the sign of the shape parameter k is changed and the parameters are renamed:

F(x) = \exp [ - \lbrace 1 + \xi ( x - \mu ) / \sigma) \rbrace^{-1/\xi}].

Users should be able to mix functions from packages that use either form; just be aware that the sign of the shape parameter will need to be changed when converting from one form to the other (and that \xi is a location parameter in one form and a shape parameter in the other).

References

Jenkinson, A. F. (1955). The frequency distribution of the annual maximum (or minimum) of meteorological elements. Quarterly Journal of the Royal Meteorological Society, 81, 158-171.

See Also

cdfgum for the Gumbel (extreme-value type I) distribution.

cdfkap for the kappa distribution, which generalizes the generalized extreme-value distribution.

cdfwei for the Weibull distribution,

Examples

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

lmom documentation built on Oct. 1, 2024, 1:08 a.m.