# gev: The Generalized Extreme Value Distribution In evd: Functions for Extreme Value Distributions

## Description

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

## Usage

 ```1 2 3 4``` ```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; the `shape` argument cannot be a vector (must have length one). `log` Logical; if `TRUE`, the log density is returned. `lower.tail` Logical; if `TRUE` (default), probabilities are P[X <= x], otherwise, P[X > x]

## Details

The GEV distribution function with parameters \code{loc} = a, \code{scale} = b and \code{shape} = s is

G(x) = exp[-{1+s(z-a)/b}^(-1/s)]

for 1+s(z-a)/b > 0, where b > 0. If s = 0 the distribution is defined by continuity. If 1+s(z-a)/b <= 0, the value z is either greater than the upper end point (if s < 0), or less than the lower end point (if s > 0).

The parametric form of the GEV encompasses that of the Gumbel, Frechet and reverse Weibull distributions, which are obtained for s = 0, s > 0 and s < 0 respectively. It was first introduced by Jenkinson (1955).

## Value

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

## 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.

`fgev`, `rfrechet`, `rgumbel`, `rrweibull`

## Examples

 ```1 2 3 4 5 6 7``` ```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 ```

### Example output

```[1] 0.17210639 0.06706381 0.03428205
[1] 0.7386812 0.8467772 0.8948490
[1] 5.157141 3.449973 2.800811 2.444700
[1]  0.7462607 10.3694676  0.8269460  1.0910911  1.4593689  0.8103661
[1] 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9
```

evd documentation built on May 1, 2019, 10:11 p.m.