# GEV: Generalized Extreme Value Distribution (for maxima) In FAdist: Distributions that are Sometimes Used in Hydrology

 GEV R Documentation

## Generalized Extreme Value Distribution (for maxima)

### Description

Density, distribution function, quantile function and random generation for the generalized extreme value distribution (for maxima) with shape, scale, and location parameters equal to `shape`, `scale`, and `location`, respectively.

### Usage

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

### Arguments

 `x,q` vector of quantiles. `p` vector of probabilities. `n` number of observations. `shape` shape parameter. `scale` scale parameter. `location` location parameter. `log,log.p` logical; if TRUE, probabilities p are given as log(p). `lower.tail` logical; if TRUE (default), probabilities are P[X <= x],otherwise, P[X > x].

### Details

If X is a random variable distributed according to a generalized extreme value distribution, it has density
f(x) = 1/scale*(1+shape*((x-location)/scale))^(-1/shape-1)*exp(-(1+shape*((x-location)/scale))^(-1/shape))

### Value

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

### References

Coles, S. (2001) An introduction to statistical modeling of extreme values. Springer

### Examples

```x <- rgev(1000,-.1,3,100)
hist(x,freq=FALSE,col='gray',border='white')