Learn R Programming

evgam (version 1.0.2)

bgev: The blended generalised extreme value distribution

Description

Density, distribution function, quantile function and random generation for the blended generalised extreme value distribution with parameters location, scale, shape, pa, pb, alpha and beta.

Usage

dbgev(
  x,
  location,
  scale,
  shape,
  pa = 0.05,
  pb = 0.2,
  alpha = 0.5,
  beta = 0.5,
  log = FALSE
)

pbgev( q, location, scale, shape, pa = 0.05, pb = 0.2, alpha = 0.5, beta = 0.5, lower.tail = TRUE, log.p = FALSE )

qbgev( p, location, scale, shape, pa = 0.05, pb = 0.2, alpha = 0.5, beta = 0.5, lower.tail = TRUE, log.p = FALSE )

rbgev(n, location, scale, shape, pa = 0.05, pb = 0.2, alpha = 0.5, beta = 0.5)

Value

dbgev gives the density, pbgev gives the distribution function, qbgev gives the quantile function, and rbgev generates random deviates.

Arguments

x, q

vector of quantiles.

location, scale, shape

location, scale and shape parameters.

pa, pb, alpha, beta

Gumbel to GEV mixing parameters; see Details.

log, log.p

logical; if TRUE, probabilities p are given as log(p).

lower.tail

logical; if TRUE (default), probabilities are \(P[X \le x]\), otherwise, \(P[X > x]\).

p

vector of probabilities.

n

number of observations.

Details

The blended generalised extreme value distribution with location parameter \(q_\alpha\), scale parameter \(s_\beta\) and shape parameter \(\xi\) has cumulative distribution function given by $$H(x \mid q_\alpha, s_\beta, \xi) = F(x \mid q_\alpha, s_\beta, \xi)^{p(x')} G(x \mid \tilde q_\alpha \tilde s_\beta)^{1 - p(x')}$$ where $$F(x \mid q_\alpha, s_\beta, \xi) = \exp \left\{ - \left[ \dfrac{x - q_\alpha}{s_\beta(\ell_{1 - \beta / 2, \xi} - \ell_{\beta / 2, \xi})^{-1}} + \ell_{\alpha, \xi} \right]^{-1/\xi}_+ \right\}$$ with \(\ell_{a, \xi} = (-\log a)^{-\xi}\), \([x]_+ = \max(0, x)\), alpha and beta parameters \(\alpha\) and \(\beta\), respectively, $$G(x \mid q_{\tilde \alpha}, s_{\tilde \beta}) = \exp\left\{ -\exp\left[- \left\{\dfrac{x - \tilde q_\alpha}{\tilde s_\beta(\ell_{1 - \beta / 2} - \ell_{\beta / 2})^{-1}} + \ell_{\alpha} \right\}\right]\right\}$$ with \(\ell_a = \log(-\log a)\), $$\tilde q_\alpha = a - \dfrac{(b - a)(\ell_\alpha - \ell_{p_a}))}{\ell_{p_a} - \ell_{p_b}}~~\text{and}~~\tilde s_\beta = \dfrac{(b - a)(\ell_{\beta / 2} - \ell_{1 - \beta/2})}{\ell_{p_a} - \ell_{p_b}},$$ with \(a = F^{-1}(p_a \mid q_\alpha, s_\beta, \xi)\), \(b = F^{-1}(p_b \mid q_\alpha, s_\beta, \xi)\), with pa and pb parameters \(p_a\) and \(p_b\), respectively, and where \(x' = (x - a) / (b - a)\) and \(p(x)\) denotes the cumulative distribution of the Beta(5, 5) distribution.

Default values for pa, pb, alpha and beta are taken from Castro-Camilo et al. (2022).

References

Castro-Camilo, D., Huser, R., & Rue, H. (2022). Practical strategies for generalized extreme value-based regression models for extremes. Environmetrics, 33(6), e2742. tools:::Rd_expr_doi("10.1002/env.2742")

See Also

predict.evgam

Examples

Run this code

dbgev(3, 2, 1, .1)

Run the code above in your browser using DataLab