revGumbel: "Reverse" Gumbel Distribution Functions

Description Usage Arguments Value Author(s) See Also Examples

Description

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

Usage

1
2
3
4
drevgumbel (x, location = 0, scale = 1)
prevgumbel (q, location = 0, scale = 1)
qrevgumbel (p, location = 0, scale = 1)
rrevgumbel (n, location = 0, scale = 1)

Arguments

x, q

numeric vector of abscissa (or quantile) values at which to evaluate the density or distribution function.

p

numeric vector of probabilities at which to evaluate the quantile function.

location

location of the distribution

scale

scale (> 0) of the distribution.

n

number of random variates, i.e., length of resulting vector of rrevgumbel(..).

Value

a numeric vector, of the same length as x, q, or p for the first three functions, and of length n for rrevgumbel().

Author(s)

Werner Stahel; partly inspired by package VGAM. Martin Maechler for numeric cosmetic.

See Also

the Weibull distribution functions in R's stats package.

Examples

1
2
3
4
5
6
7
8
9
curve(prevgumbel(x, scale= 1/2), -3,2, n=1001, col=1, lwd=2,
      main = "revgumbel(x, scale = 1/2)")
abline(h=0:1, v = 0, lty=3, col = "gray30")
curve(drevgumbel(x, scale= 1/2),       n=1001, add=TRUE,
      col = (col.d <- adjustcolor(2, 0.5)), lwd=3)
legend("left", c("cdf","pdf"), col=c("black", col.d), lwd=2:3, bty="n")

med <- qrevgumbel(0.5, scale=1/2)
cat("The median is:",  format(med),"\n")

regr0 documentation built on May 2, 2019, 4:52 p.m.

Related to revGumbel in regr0...