View source: R/GeneralisedExtremeValue.R
| GEV | R Documentation | 
The GEV distribution arises from the Extremal Types Theorem, which is rather
like the Central Limit Theorem (see \link{Normal}) but it relates to
the maximum of n i.i.d. random variables rather than to the sum.
If, after a suitable linear rescaling, the distribution of this maximum
tends to a non-degenerate limit as n tends to infinity then this limit
must be a GEV distribution. The requirement that the variables are independent
can be relaxed substantially. Therefore, the GEV distribution is often used
to model the maximum of a large number of random variables.
GEV(mu = 0, sigma = 1, xi = 0)
| mu | The location parameter, written  | 
| sigma | The scale parameter, written  | 
| xi | The shape parameter, written  | 
We recommend reading this documentation on https://alexpghayes.github.io/distributions3/, where the math will render with additional detail and much greater clarity.
In the following, let X be a GEV random variable with location
parameter  mu = \mu, scale parameter sigma = \sigma and
shape parameter xi = \xi.
Support:
(-\infty, \mu - \sigma / \xi) for \xi < 0;
(\mu - \sigma / \xi, \infty) for \xi > 0;
and R, the set of all real numbers, for \xi = 0.
Mean: \mu + \sigma[\Gamma(1 - \xi) - 1]/\xi for
\xi < 1, \xi \neq 0;
\mu + \sigma\gamma for \xi = 0, where \gamma
is Euler's constant, approximately equal to 0.57722; undefined otherwise.
Median: \mu + \sigma[(\ln 2) ^ {-\xi} - 1]/\xi for \xi \neq 0;
\mu - \sigma\ln(\ln 2) for \xi = 0.
Variance:
\sigma^2 [\Gamma(1 - 2 \xi) - \Gamma(1 - \xi)^2] / \xi^2
for \xi < 1 / 2, \xi \neq 0;
\sigma^2 \pi^2 / 6 for \xi = 0; undefined otherwise.
Probability density function (p.d.f):
If \xi \neq 0 then
f(x) = \sigma ^ {-1} [1 + \xi (x - \mu) / \sigma] ^ {-(1 + 1/\xi)}%
         \exp\{-[1 + \xi (x - \mu) / \sigma] ^ {-1/\xi} \}
for 1 + \xi (x - \mu) / \sigma > 0.  The p.d.f. is 0 outside the
support.
In the \xi = 0 (Gumbel) special case
f(x) = \sigma ^ {-1} \exp[-(x - \mu) / \sigma]%
        \exp\{-\exp[-(x - \mu) / \sigma] \}
for x in R, the set of all real numbers.
Cumulative distribution function (c.d.f):
If \xi \neq 0 then
F(x) = \exp\{-[1 + \xi (x - \mu) / \sigma] ^ {-1/\xi} \}
for 1 + \xi (x - \mu) / \sigma > 0.  The c.d.f. is 0 below the
support and 1 above the support.
In the \xi = 0 (Gumbel) special case
F(x) = \exp\{-\exp[-(x - \mu) / \sigma] \}
for x in R, the set of all real numbers.
A GEV object.
Other continuous distributions: 
Beta(),
Cauchy(),
ChiSquare(),
Erlang(),
Exponential(),
FisherF(),
Frechet(),
GP(),
Gamma(),
Gumbel(),
LogNormal(),
Logistic(),
Normal(),
RevWeibull(),
StudentsT(),
Tukey(),
Uniform(),
Weibull()
set.seed(27)
X <- GEV(1, 2, 0.1)
X
random(X, 10)
pdf(X, 0.7)
log_pdf(X, 0.7)
cdf(X, 0.7)
quantile(X, 0.7)
cdf(X, quantile(X, 0.7))
quantile(X, cdf(X, 0.7))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.