Density, distribution function, quantile function, and random generation for the Gumbel distribution.

dgumbel(x, location = 0, scale = 1, log = FALSE)

pgumbel(q, location = 0, scale = 1, log.p = FALSE, lower.tail = TRUE)

qgumbel(p, location = 0, scale = 1, log.p = FALSE, lower.tail = TRUE)

rgumbel(n, location = 0, scale = 1)

Arguments

x

Numeric vector of quantiles.

location

Numeric location parameter.

scale

Numeric scale parameter.

log

Logical. If TRUE, dgumbel() returns log-densities.

q

Numeric vector of quantiles.

log.p

Logical. If TRUE, probabilities are supplied or returned on the log scale.

lower.tail

Logical. If TRUE, probabilities are \(P[X \le x]\); otherwise, \(P[X > x]\).

p

Numeric vector of probabilities.

n

Number of observations.

Value

  • dgumbel() returns a numeric vector of density values.

  • pgumbel() returns a numeric vector of probabilities.

  • qgumbel() returns a numeric vector of quantiles.

  • rgumbel() returns a numeric vector of random draws.

Note

Version 1.0.0.

Examples

dgumbel(c(-1, 0, 1), location = 0, scale = 1)
#> [1] 0.1793741 0.3678794 0.2546464
pgumbel(c(-1, 0, 1), location = 0, scale = 1)
#> [1] 0.06598804 0.36787944 0.69220063
qgumbel(c(0.25, 0.75), location = 0, scale = 1)
#> [1] -0.3266343  1.2458993

set.seed(1)
rgumbel(3, location = 0, scale = 1)
#> [1] 1.1757836 0.7648313 0.1617805