Learn R Programming

reliaR (version 0.2)

Gumbel: The Gumbel distribution

Description

Density, distribution function, quantile function and random generation for the Gumbel distribution with location parameter mu and scale parameter sigma.

Usage

dgumbel(x, mu, sigma, log = FALSE)
pgumbel(q, mu, sigma, lower.tail = TRUE, log.p = FALSE)
qgumbel(p, mu, sigma, lower.tail = TRUE, log.p = FALSE)
rgumbel(n, mu, sigma)

Value

dgumbel gives the density,

pgumbel gives the distribution function,

qgumbel gives the quantile function, and

rgumbel generates random deviates.

Arguments

x,q

vector of quantiles.

p

vector of probabilities.

n

number of observations. If length(n) > 1, the length is taken to be the number required.

mu

location parameter.

sigma

scale parameter.

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]\).

Details

The Gumbel distribution has density $$f(x) = \frac{1}{\sigma} \; \exp\left\{-\left(\frac{x-\mu}{\sigma}\right)\right\} \; \exp\left[-\exp\left\{-\left(\frac{x-\mu}{\sigma}\right)\right\}\right];\, -\infty < x < \infty, \sigma > 0.$$ where \(\mu\) and \(\sigma\) are the shape and scale parameters, respectively.

References

Marshall, A. W., Olkin, I. (2007). Life Distributions: Structure of Nonparametric, Semiparametric, and Parametric Families, Springer, New York.

See Also

.Random.seed about random number; sgumbel for Gumbel survival / hazard etc. functions

Examples

Run this code
## Load data sets
data(dataset2)
## Maximum Likelihood(ML) Estimates of mu & sigma for the data(dataset2)
## Estimates of mu & sigma using 'maxLik' package
## mu.est = 212.157, sigma.est = 151.768

dgumbel(dataset2, 212.157, 151.768, log = FALSE)
pgumbel(dataset2, 212.157, 151.768, lower.tail = TRUE, log.p = FALSE)
qgumbel(0.25, 212.157, 151.768, lower.tail=TRUE, log.p = FALSE)
rgumbel(30, 212.157, 151.768)

Run the code above in your browser using DataLab