gompmake: Distribution function of the Gompertz-Makeham distribution

pgompmakeR Documentation

Distribution function of the Gompertz-Makeham distribution

Description

Distribution function of the Gompertz-Makeham distribution

Quantile function of the Gompertz-Makeham distribution

Density function of the Gompertz-Makeham distribution

Hazard function of the Gompertz-Makeham distribution

Usage

pgompmake(
  q,
  scale = 1,
  shape = 0,
  lambda = 0,
  lower.tail = TRUE,
  log.p = FALSE
)

qgompmake(p, scale = 1, shape = 0, lambda = 0, lower.tail = TRUE)

dgompmake(x, scale = 1, shape = 0, lambda = 0, log = FALSE)

hgompmake(x, scale = 1, shape = 0, lambda = 0, log = FALSE)

Arguments

q

vector of quantiles.

scale

scale parameter, strictly positive.

shape

shape parameter.

lambda

exponential rate

lower.tail

logical; if TRUE (default), the lower tail probability \Pr(X \leq x) is returned.

log.p

logical; if FALSE (default), values are returned on the probability scale.

p

vector of probabilities.

x

vector of quantiles.

log

logical; if TRUE, return the log hazard

Value

a vector of (log)-probabilities of the same length as q

a vector of quantiles

a vector of density

a vector of (log)-hazard.

Note

The quantile function is defined in terms of Lambert's W function. Particular parameter combinations (small values of lambda lead to numerical overflow; the function throws a warning when this happens.


longevity documentation built on Nov. 12, 2023, 5:07 p.m.