Description Usage Arguments Details Value References Examples

Density function, distribution function, quantile function and random generation for the generalised extreme value (GEV) distribution.

1 2 3 4 5 6 7 8 9 |

`x, q` |
Numeric vectors of quantiles. |

`loc, scale, shape` |
Numeric vectors.
Location, scale and shape parameters.
All elements of |

`log, log.p` |
A logical scalar; if TRUE, probabilities p are given as log(p). |

`m` |
A numeric scalar. The distribution is reparameterised by working
with the GEV( |

`lower.tail` |
A logical scalar. If TRUE (default), probabilities are P[X <= x], otherwise, P[X > x]. |

`p` |
A numeric vector of probabilities in [0,1]. |

`n` |
Numeric scalar. The number of observations to be simulated.
If |

The distribution function of a GEV distribution with parameters
`loc`

= *μ*, `scale`

= *σ* (>0) and
`shape`

= *ξ* is

*F(x) = exp { - [1 + ξ (x - μ) / σ] ^ (-1/ξ)} *

for *1 + ξ (x - μ) / σ > 0*. If *ξ = 0* the
distribution function is defined as the limit as *ξ* tends to zero.
The support of the distribution depends on *ξ*: it is
*x <= μ - σ / ξ* for *ξ < 0*;
*x >= μ - σ / ξ* for *ξ > 0*;
and *x* is unbounded for *ξ = 0*.
Note that if *ξ < -1* the GEV density function becomes infinite
as *x* approaches *μ -σ / ξ* from below.

If `lower.tail = TRUE`

then if `p = 0`

(`p = 1`

) then
the lower (upper) limit of the distribution is returned, which is
`-Inf`

or `Inf`

in some cases. Similarly, but reversed,
if `lower.tail = FALSE`

.

See https://en.wikipedia.org/wiki/Generalized_extreme_value_distribution for further information.

The effect of `m`

is to change the location, scale and shape
parameters to
*(μ + σ log m, σ, ξ)* if *ξ = 0* and
*(μ + σ (m ^ ξ - 1) / ξ, σ m ^ ξ, ξ)*.
For integer `m`

we can think of this as working with the
maximum of `m`

independent copies of the original
GEV(`loc, scale, shape`

) variable.

`dgev`

gives the density function, `pgev`

gives the
distribution function, `qgev`

gives the quantile function,
and `rgev`

generates random deviates.

The length of the result is determined by `n`

for `rgev`

,
and is the maximum of the lengths of the numerical arguments for the
other functions.

The numerical arguments other than `n`

are recycled to the length
of the result.

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: http://dx.doi.org/10.1002/qj.49708134804

Coles, S. G. (2001) *An Introduction to Statistical
Modeling of Extreme Values*, Springer-Verlag, London.
http://dx.doi.org/10.1007/978-1-4471-3675-0_3

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | ```
dgev(-1:4, 1, 0.5, 0.8)
dgev(1:6, 1, 0.5, -0.2, log = TRUE)
dgev(1, shape = c(-0.2, 0.4))
pgev(-1:4, 1, 0.5, 0.8)
pgev(1:6, 1, 0.5, -0.2)
pgev(1, c(1, 2), c(1, 2), c(-0.2, 0.4))
pgev(-3, c(1, 2), c(1, 2), c(-0.2, 0.4))
pgev(7, 1, 1, c(-0.2, 0.4))
qgev((1:9)/10, 2, 0.5, 0.8)
qgev(0.5, c(1,2), c(0.5, 1), c(-0.5, 0.5))
p <- (1:9)/10
pgev(qgev(p, 1, 2, 0.8), 1, 2, 0.8)
rgev(6, 1, 0.5, 0.8)
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.