Learn R Programming

NeuDist (version 1.0.1)

LindleyGompertz: Lindley-Gompertz Distribution

Description

Provides density, distribution, quantile, random generation, and hazard functions for the Lindley-Gompertz distribution.

Usage

dlindley.gpz(x, alpha, lambda, theta, log = FALSE)
plindley.gpz(q, alpha, lambda, theta, lower.tail = TRUE, log.p = FALSE)
qlindley.gpz(p, alpha, lambda, theta, lower.tail = TRUE, log.p = FALSE)
rlindley.gpz(n, alpha, lambda, theta)
hlindley.gpz(x, alpha, lambda, theta)

Value

  • dlindley.gpz: numeric vector of (log-)densities

  • plindley.gpz: numeric vector of probabilities

  • qlindley.gpz: numeric vector of quantiles

  • rlindley.gpz: numeric vector of random variates

  • hlindley.gpz: numeric vector of hazard values

Arguments

x, q

numeric vector of quantiles (x, q)

alpha

positive numeric parameter

lambda

positive numeric parameter

theta

positive numeric parameter

log

logical; if TRUE, returns log-density

lower.tail

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

log.p

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

p

numeric vector of probabilities (0 < p < 1)

n

number of observations (integer > 0)

Details

The Lindley-Gompertz distribution is parameterized by the parameters \(\alpha > 0\), \(\lambda > 0\), and \(\theta > 0\).

The Lindley-Gompertz distribution has CDF:

$$ F(x; \alpha, \lambda, \theta) = \left( 1 - \exp\left\{ \frac{\lambda}{\alpha} \left( 1 - \exp(\alpha x) \right) \right\} \right)^{\theta} \left[ 1 - \frac{\theta}{1 + \theta} \log\left\{ 1 - \exp\left( \frac{\lambda}{\alpha} \left( 1 - \exp(\alpha x) \right) \right) \right\} \right], \quad x > 0. $$

where \(\alpha\), \(\lambda\), and \(\theta\) are the parameters.

References

Joshi, R. K., & Kumar, V. (2020). Lindley Gompertz distribution with properties and application. International Journal of Statistics and Applied Mathematics, 5(6), 28--37. tools:::Rd_expr_doi("10.22271/maths.2020.v5.i6a.610")

Examples

Run this code
x <- seq(1, 10, 0.5)
dlindley.gpz(x, 0.1, 0.5, 1.5)
plindley.gpz(x, 0.1, 0.5, 1.5)
qlindley.gpz(0.5, 0.1, 0.5, 1.5)
rlindley.gpz(10, 0.1, 0.5, 1.5)
hlindley.gpz(x, 0.1, 0.5, 1.5)

# Data
x <- conductors
# ML estimates
params = list(alpha=0.1765, lambda=0.2051, theta=11.4574)
#P–P (probability–probability) plot
pp.plot(x, params = params, pfun = plindley.gpz, fit.line=TRUE)

#Q-Q (quantile–quantile) plot 
qq.plot(x, params = params, qfun = qlindley.gpz, fit.line=TRUE)

# Goodness-of-Fit(GoF) and Model Diagnostics 
out <- gofic(x, params = params,
             dfun = dlindley.gpz, pfun=plindley.gpz, plot=FALSE)
print.gofic(out)

Run the code above in your browser using DataLab