Learn R Programming

mev (version 1.17)

gevdist: Generalized extreme value distribution

Description

Density function, distribution function, quantile function and random number generation for the generalized extreme value distribution.

Usage

qgev(p, loc = 0, scale = 1, shape = 0, lower.tail = TRUE, log.p = FALSE)

rgev(n, loc = 0, scale = 1, shape = 0)

dgev(x, loc = 0, scale = 1, shape = 0, log = FALSE)

pgev(q, loc = 0, scale = 1, shape = 0, lower.tail = TRUE, log.p = FALSE)

Arguments

p

vector of probabilities

loc

scalar or vector of location parameters whose length matches that of the input

scale

scalar or vector of positive scale parameters whose length matches that of the input

shape

scalar shape parameter

lower.tail

logical; if TRUE (default), returns the distribution function, otherwise the survival function

n

scalar number of observations

x, q

vector of quantiles

log, log.p

logical; if TRUE, probabilities \(p\) are given as \(\log(p)\).

Author

Leo Belzile, with code adapted from Paul Northrop

Details

The distribution function of a GEV distribution with parameters loc = \(\mu\), scale = \(\sigma\) and shape = \(\xi\) is $$F(x) = \exp\{-[1 + \xi (x - \mu) / \sigma] ^ {-1/\xi} \}$$ for \(1 + \xi (x - \mu) / \sigma > 0\). If \(\xi = 0\) the distribution function is defined as the limit as \(\xi\) tends to zero.

The quantile function, when evaluated at zero or one, returns the lower and upper endpoint, whether the latter is finite or not.

References

Jenkinson, A. F. (1955) The frequency distribution of the annual maximum (or minimum) of meteorological elements. Quart. J. R. Met. Soc., 81, 158-171. Chapter 3: tools:::Rd_expr_doi("10.1002/qj.49708134804")

Coles, S. G. (2001) An Introduction to Statistical Modeling of Extreme Values, Springer-Verlag, London. tools:::Rd_expr_doi("10.1007/978-1-4471-3675-0_3")