# log_gev: The Generalised Extreme Value Log-Density Function In chandwich: Chandler-Bate Sandwich Loglikelihood Adjustment

## Description

Log-Density function of the generalised extreme value (GEV) distribution

## Usage

 `1` ```log_gev(x, loc = 0, scale = 1, shape = 0) ```

## Arguments

 `x` Numeric vectors of quantiles. `loc, scale, shape` Numeric scalars. Location, scale and shape parameters. `scale` must be positive.

## Details

It is assumed that `x`, `loc` = μ, `scale` = σ and `shape` = ξ are such that the GEV density is non-zero, i.e. that 1 + ξ (x - μ) / σ > 0. No check of this, or that `scale` > 0 is performed in this function.

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.

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

## Value

A numeric vector of value(s) of the log-density of the GEV distribution.

## 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. Chapter 3: doi: 10.1002/qj.49708134804

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

## Examples

 ```1 2``` ```log_gev(1:4, 1, 0.5, 0.8) log_gev(1:3, 1, 0.5, -0.2) ```

chandwich documentation built on July 3, 2021, 1:06 a.m.