Learn R Programming

EnvStats (version 2.4.0)

EVD: The Extreme Value (Gumbel) Distribution

Description

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

Usage

devd(x, location = 0, scale = 1)
  pevd(q, location = 0, scale = 1)
  qevd(p, location = 0, scale = 1)
  revd(n, location = 0, scale = 1)

Arguments

x

vector of quantiles.

q

vector of quantiles.

p

vector of probabilities between 0 and 1.

n

sample size. If length(n) is larger than 1, then length(n) random values are returned.

location

vector of location parameters.

scale

vector of positive scale parameters.

Value

density (devd), probability (pevd), quantile (qevd), or random sample (revd) for the extreme value distribution with location parameter(s) determined by location and scale parameter(s) determined by scale.

Details

Let \(X\) be an extreme value random variable with parameters location=\(\eta\) and scale=\(\theta\). The density function of \(X\) is given by: $$f(x; \eta, \theta) = \frac{1}{\theta} e^{-(x-\eta)/\theta} exp[-e^{-(x-\eta)/\theta}]$$ where \(-\infty < x, \eta < \infty\) and \(\theta > 0\).

The cumulative distribution function of \(X\) is given by: $$F(x; \eta, \theta) = exp[-e^{-(x-\eta)/\theta}]$$

The \(p^{th}\) quantile of \(X\) is given by: $$x_{p} = \eta - \theta log[-log(p)]$$

The mode, mean, variance, skew, and kurtosis of \(X\) are given by: $$Mode(X) = \eta$$ $$E(X) = \eta + \epsilon \theta$$ $$Var(X) = \theta^2 \pi^2 / 6$$ $$Skew(X) = \sqrt{\beta_1} = 1.139547$$ $$Kurtosis(X) = \beta_2 = 5.4$$ where \(\epsilon\) denotes Euler's constant, which is equivalent to -digamma(1).

References

Forbes, C., M. Evans, N. Hastings, and B. Peacock. (2011). Statistical Distributions. Fourth Edition. John Wiley and Sons, Hoboken, NJ.

Johnson, N. L., S. Kotz, and N. Balakrishnan. (1995). Continuous Univariate Distributions, Volume 2. Second Edition. John Wiley and Sons, New York.

See Also

eevd, GEVD, Probability Distributions and Random Numbers.

Examples

Run this code
# NOT RUN {
  # Density of an extreme value distribution with location=0, scale=1, 
  # evaluated at 0.5:

  devd(.5) 
  #[1] 0.3307043

  #----------

  # The cdf of an extreme value distribution with location=1, scale=2, 
  # evaluated at 0.5:

  pevd(.5, 1, 2) 
  #[1] 0.2769203

  #----------

  # The 25'th percentile of an extreme value distribution with 
  # location=-2, scale=0.5:

  qevd(.25, -2, 0.5) 
  #[1] -2.163317

  #----------

  # Random sample of 4 observations from an extreme value distribution with 
  # location=5, scale=2. 
  # (Note: the call to set.seed simply allows you to reproduce this example.)

  set.seed(20) 
  revd(4, 5, 2) 
  #[1] 9.070406 7.669139 4.511481 5.903675
# }

Run the code above in your browser using DataLab