dgumbel gives the density, pgumbel gives the distribution function, qgumbel gives the quantile function, and rgumbel generates random deviates.
The length of the result is determined by n for rgumbel, and is the maximum of the lengths of the numerical arguments for the other functions.
The numerical arguments other than n are recycled to the length of the result.
Arguments
q
vector of quantiles.
location
location parameter and mode of the distribution.
scale
scaling parameter, has to be positive.
x
vector of locations.
p
vector of probabilities.
n
number of observations. If \(length(n) > 1\), the length is taken to be the number required.
Details
The gumbel distribution has the following density and cdf
\(f(x) = (1/scale)*exp((x - location)/scale - exp((x - location)/scale))\),
\(F(x) = 1 - exp(- exp((x - location)/scale))\).
The mode of the distribution is location, the variance is \(\pi^{2/6} * \code{scale}\).
References
Collett, D. (2015). Modelling survival data in medical research, chapter 6. CRC press.