evd (version 1.0-0)

gev: The Generalized Extreme Value Distribution

Description

Density, distribution function, quantile function and random generation for the generalized extreme value (GEV) distribution with location, scale and shape parameters.

Usage

dgev(x, loc=0, scale=1, shape=0, log = FALSE) 
pgev(q, loc=0, scale=1, shape=0, lower.tail = TRUE) 
qgev(p, loc=0, scale=1, shape=0, lower.tail = TRUE)
rgev(n, loc=0, scale=1, shape=0)

Arguments

x, q
vector of quantiles.
p
vector of probabilities.
n
number of observations.
loc, scale, shape
location, scale and shape parameters.
log
logical; if TRUE, the log density is returned.
lower.tail
logical; if TRUE (default), probabilities are P[X <= x],="" otherwise,="" p[x=""> x]

Value

  • dgev gives the density, pgev gives the distribution function, qgev gives the quantile function, and rgev generates random deviates.

Details

The GEV distribution function with parameters $\code{loc} = a$, $\code{scale} = b$ and $\code{shape} = s$ is $$G(z) = \exp\left[-{1+s(z-a)/b}^{-1/s}\right]$$ for $1+s(z-a)/b > 0$, where $b > 0$. If $s = 0$ the distribution is defined by continuity. The parametric form of the GEV encompasses that of the Gumbel, Frechet and reversed Weibull distributions, which are obtained for $s = 0$, $s > 0$ and $s < 0$ respectively.

See Also

rfrechet, rgumbel, rrweibull

Examples

Run this code
dgev(2:4, 1, 0.5, 0.8)
pgev(2:4, 1, 0.5, 0.8)
qgev(seq(0.9, 0.6, -0.1), 2, 0.5, 0.8)
rgev(6, 1, 0.5, 0.8)
p <- (1:9)/10
pgev(qgev(p, 1, 2, 0.8), 1, 2, 0.8)
## [1] 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9

Run the code above in your browser using DataLab