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

 log_gev R Documentation

The Generalised Extreme Value Log-Density Function

Description

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

Usage

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 = \mu, scale = \sigma and shape = \xi are such that the GEV density is non-zero, i.e. that 1 + \xi (x - \mu) / \sigma > 0. No check of this, or that scale > 0 is performed in this function.

The distribution function of a GEV distribution with parameters loc = \mu, scale = \sigma (>0) and shape = \xi is

F(x) = exp { - [1 + \xi (x - \mu) / \sigma] ^ (-1/\xi)}

for 1 + \xi (x - \mu) / \sigma > 0. If \xi = 0 the distribution function is defined as the limit as \xi tends to zero. The support of the distribution depends on \xi: it is x <= \mu - \sigma / \xi for \xi < 0; x >= \mu - \sigma / \xi for \xi > 0; and x is unbounded for \xi = 0. Note that if \xi < -1 the GEV density function becomes infinite as x approaches \mu -\sigma / \xi 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: \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1002/qj.49708134804")}

Coles, S. G. (2001) An Introduction to Statistical Modeling of Extreme Values, Springer-Verlag, London. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1007/978-1-4471-3675-0_3")}

Examples

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


chandwich documentation built on Aug. 26, 2023, 1:07 a.m.