Learn R Programming

eha (version 2.4-6)

Gompertz: The Gompertz Distribution

Description

Density, distribution function, quantile function, hazard function, cumulative hazard function, and random generation for the Gompertz distribution with parameters shape and scale.

Usage

dgompertz(x, shape = 1, scale = 1, log = FALSE, param = c("default", "canonical"))
pgompertz(q, shape = 1, scale = 1, lower.tail = TRUE, log.p = FALSE,
param = c("default", "canonical"))
qgompertz(p, shape = 1, scale = 1, lower.tail = TRUE, log.p = FALSE,
param = c("default", "canonical"))
hgompertz(x, shape = 1, scale = 1, log = FALSE, param = c("default", "canonical"))
Hgompertz(x, shape = 1, scale = 1, log.p = FALSE, param = c("default", "canonical"))
rgompertz(n, shape = 1, scale = 1, param = c("default", "canonical"))

Arguments

x, q

vector of quantiles.

p

vector of probabilities.

n

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

shape, scale

Parameters: shape, defaulting to 1, and scale, defaulting to 1.

log, log.p

logical; if TRUE, probabilities p are given as log(p).

lower.tail

logical; if TRUE (default), probabilities are \(P(X \le x)\), otherwise, \(P(X > x)\).

param

See 'details' below.

Value

dgompertz gives the density, pgompertz gives the distribution function, qgompertz gives the quantile function, hgompertz gives the hazard function, Hgompertz gives the cumulative hazard function, and rgompertz generates random deviates.

Invalid arguments will result in return value NaN, with a warning.

Details

The Gompertz distribution with shape parameter \(a\) and scale parameter \(\sigma\) has hazard given by $$h(x) = a \exp(x/\sigma)$$ for \(x \ge 0\). If param = "canonical", then then a --> a/b, so that b is a true scale parameter (for any fixed a), and b is an 'AFT parameter'.