# Gumbel: The Gumbel distribution In ExtDist: Extending the Range of Functions for Probability Distributions

## Description

Density, distribution, quantile, random number generation, and parameter estimation functions for the Gumbel distribution with parameters `location` and `scale`. Parameter estimation can be based on a weighted or unweighted i.i.d sample and can be performed analytically or numerically.

## Usage

 ``` 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16``` ```dGumbel(x, location = 0, scale = 1, params = list(location = 0, scale = 1), ...) pGumbel(q, location = 0, scale = 1, params = list(location = 0, scale = 1), ...) qGumbel(p, location = 0, scale = 1, params = list(location = 0, scale = 1), ...) rGumbel(n, location = 0, scale = 1, params = list(location = 0, scale = 1), ...) eGumbel(X, w, method = c("moments", "numerical.MLE"), ...) lGumbel(X, w, location = 0, scale = 1, params = list(location = 0, scale = 1), logL = TRUE, ...) ```

## Arguments

 `x,q` A vector of quantiles. `location` Location parameter. `scale` Scale parameter. `params` A list that includes all named parameters `...` Additional parameters. `p` A vector of probabilities. `n` Number of observations. `X` Sample observations. `w` An optional vector of sample weights. `method` Parameter estimation method. `logL` logical if TRUE, lGumbel gives the log-likelihood, otherwise the likelihood is given.

## Details

The `dGumbel()`, `pGumbel()`, `qGumbel()`,and `rGumbel()` functions serve as wrappers of the `dgumbel`, `pgumbel`, `qgumbel`, and `rgumbel` functions in the VGAM package.They allow for the parameters to be declared not only as individual numerical values, but also as a list so parameter estimation can be carried out.

The Gumbel distribution is a special case of the generalised extreme value (GEV) distribution and has probability density function,

f(x) = exp{(-exp{-(x-μ)/σ)}}

where μ = `location` and σ = `scale` which has the constraint σ > 0. The analytical parameter estimations are as given by the Engineering Statistics Handbook with corresponding standard errors given by Bury (p.273).

The log-likelihood function of the Gumbel distribution is given by

l(μ, σ| x) = σ^{-n} exp(-∑ (x_{i}-μ/σ) - ∑ exp(-(x_{i}-μ/σ))).

Shi (1995) provides the score function and Fishers information matrix.

## Value

dGumbel gives the density, pGumbel the distribution function, qGumbel the quantile function, rGumbel generates random deviates, and eGumbel estimate the distribution parameters. lGumbel provides the log-likelihood function.

## Author(s)

Haizhen Wu and A. Jonathan R. Godfrey.
Updates and bug fixes by Sarah Pirikahu.

## References

Johnson, N. L., Kotz, S. and Balakrishnan, N. (1995) Continuous Univariate Distributions, volume 2, chapter 22, Wiley, New York.

Engineering Statistics Handbook.

Bury, K. (1999) Statistical Distributions in Engineering, Chapter 15, pp.283-284, Cambridge University Press.

Shi, D. (1995). Multivariate extreme value distribution and its Fisher information matrix. Acta Mathematicae

ExtDist for other standard distributions.

## Examples

 ``` 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30``` ```# Parameter estimation for a distribution with known shape parameters X <- rGumbel(n = 500, location = 1.5, scale = 0.5) est.par <- eGumbel(X, method="moments"); est.par plot(est.par) # Extracting location and scale parameters est.par[attributes(est.par)\$par.type=="location"] est.par[attributes(est.par)\$par.type=="scale"] # Fitted density curve and histogram den.x <- seq(min(X),max(X),length=100) den.y <- dGumbel(den.x, location = est.par\$location, scale= est.par\$scale) hist(X, breaks=10, probability=TRUE, ylim = c(0,1.1*max(den.y))) lines(den.x, den.y, col="blue") lines(density(X)) # Parameter Estimation for a distribution with unknown shape parameters # Example from; Bury(1999) pp.283-284, parameter estimates as given by Bury are location = 33.5 # and scale = 2.241 data <- c(32.7, 30.4, 31.8, 33.2, 33.8, 35.3, 34.6, 33, 32, 35.7, 35.5, 36.8, 40.8, 38.7, 36.7) est.par <- eGumbel(X=data, method="numerical.MLE"); est.par plot(est.par) # log-likelihood lGumbel(data, param = est.par) # Evaluating the precision of the parameter estimates by the Hessian matrix H <- attributes(est.par)\$nll.hessian var <- solve(H) se <- sqrt(diag(var)); se ```

### Example output   ```Attaching package: 'ExtDist'

The following object is masked from 'package:stats':

BIC

Parameters for the Gumbel distribution.
(found using the  moments method.)

Parameter     Type  Estimate       S.E.
location location 1.5316092 0.02339721
scale    scale 0.5221511 0.01519824

\$location
 1.531609

\$scale
 0.5221511

Parameters for the Gumbel distribution.
(found using the  numerical.MLE method.)

Parameter     Type  Estimate      S.E.
location location 33.466703 0.6106599
scale    scale  2.240689 0.4495509

 -35.58083
location     scale
0.6106599 0.4495509
```

ExtDist documentation built on Jan. 8, 2021, 2:39 a.m.