Density, distribution function, hazards, quantile function and random generation for the Gompertz distribution with unrestricted shape.
1 2 3 4 5 6 7 8 9 10 11
vector of quantiles.
vector of shape and rate parameters.
logical; if TRUE, probabilities p are given as log(p).
logical; if TRUE (default), probabilities are P(X <= x), otherwise, P(X > x).
vector of probabilities.
number of observations. If
The Gompertz distribution with
shape parameter a and
rate parameter b has probability density function
f(x | a, b) = b exp(ax) exp(-b/a (exp(ax) - 1))
h(x | a, b) = b exp(ax)
The hazard is increasing for shape a>0 and decreasing for a<0. For a=0 the Gompertz is equivalent to the exponential distribution with constant hazard and rate b.
The probability distribution function is
F(x | a, b) = 1 - exp(-b/a (exp(ax) - 1))
Thus if a is negative, letting x tend to infinity shows that
there is a non-zero probability exp(b/a) of living
forever. On these occasions
dgompertz gives the density,
pgompertz gives the
qgompertz gives the quantile function,
hgompertz gives the hazard function,
Hgompertz gives the
cumulative hazard function, and
rgompertz generates random deviates.
Some implementations of the Gompertz restrict a to be strictly
positive, which ensures that the probability of survival decreases to zero
as x increases to infinity. The more flexible implementation given
here is consistent with
streg in Stata.
eha::dgompertz and similar available in the
package eha label the parameters the other way round, so that what is
shape there is called the
rate here, and what is
1 / scale there is called the
shape here. The
terminology here is consistent with the exponential
dweibull distributions in R.
Christopher Jackson <firstname.lastname@example.org>
Stata Press (2007) Stata release 10 manual: Survival analysis and epidemiological tables.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.