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

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

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

 ```1 2 3``` ```x <- rgev(1000,-.1,3,100) hist(x,freq=FALSE,col='gray',border='white') curve(dgev(x,-.1,3,100),add=TRUE,col='red4',lwd=2) ```

### Example output ```
```

FAdist documentation built on April 17, 2020, 1:24 a.m.