gumbel: The Gumbel Distribution

Description Usage Arguments Author(s) References Examples

Description

Density, distribution function, quantile function and random generation for the Gumbel distribution with specified location and scale parameters.

Usage

1
2
3
4
dgumbel(x, location = 0, scale = 1)
pgumbel(q, location=0, scale=1, lower.tail=TRUE)
qgumbel(p, location=0, scale=1, lower.tail=TRUE)
rgumbel(n, location=0, scale=1)

Arguments

x, q

vector of quantiles (values of the variable).

p

vector of probabilities.

n

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

location

location parameter (default 0); potentially a vector.

scale

scale parameter (default 1); potentially a vector.

lower.tail

logical; if TRUE (the default) probabilities and quantiles correspond to P(X ≤ x), if FALSE to P(X > x).

Author(s)

John Fox jfox@mcmaster.ca

References

See https://en.wikipedia.org/wiki/Gumbel_distribution for details of the Gumbel distribution.

Examples

1
2
3
4
5
6
7
8
x <- 100 + 5*c(-Inf, -1, 0, 1, 2, 3, Inf, NA)
dgumbel(x, 100, 5)
pgumbel(x, 100, 5)

p <- c(0, .25, .5, .75, 1, NA)
qgumbel(p, 100, 5)

summary(rgumbel(1e5, 100, 5))

Example output

Loading required package: car
Loading required package: carData
Loading required package: sandwich
[1] 0.000000000 0.035874816 0.073575888 0.050929276 0.023640990 0.009473802
[7] 0.000000000          NA
[1] 0.00000000 0.06598804 0.36787944 0.69220063 0.87342302 0.95143199 1.00000000
[8]         NA
[1]      -Inf  98.36683 101.83256 106.22950       Inf        NA
   Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
  87.13   98.33  101.83  102.86  106.20  152.39 

RcmdrMisc documentation built on Aug. 13, 2020, 9:06 a.m.

Related to gumbel in RcmdrMisc...