Gumbel-distribution: The Gumbel distribution

Gumbel distributionR Documentation

The Gumbel distribution

Description

Density, distribution function, quantile function and random generation for the Gumbel distribution with location parameter equal to loc, scale parameter equal to scale. This corresponds to a GEV distribution with shape parameter equal to 0.

Usage

dgum(x, loc, scale, log = FALSE)

pgum(q, loc, scale, lower.tail = TRUE, log.p = FALSE)

qgum(p, loc, scale, lower.tail = TRUE, log.p = FALSE)

rgum(n, loc, scale)

Arguments

x, q

vector of quantiles

loc

location parameter

scale

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 \leq x] otherwise, P[X > x]

p

vector of probabilities

n

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

Value

dgum gives the density, pgum gives the distribution function, qgum gives the quantile function, and rgum generates random deviates. The length of the result is determined by n for rgev, and is the maximum of the lengths of the numerical arguments for the other functions. The numerical arguments are recycled to the length of the result. Only the first elements of the logical arguments are used.

Examples

curve(dgum(x,4,6), from=-15, to = 40,type="l")
plot(ecdf(rgum(100,4,6)))
lines(seq(-15,40,by=0.5),pgum(seq(-15,40,by=0.5),4,6),col=2)
qgum(c(0.5,0.99,0.995,0.995,0.999),4,6) 
# notable quantiles

ilapros/ilaprosUtils documentation built on April 6, 2023, 4:44 a.m.