Learn R Programming

NeuDist (version 1.0.1)

GompertzExt: Gompertz Extension Distribution

Description

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

Usage

dgompertz.ext(x, alpha, lambda, theta, log = FALSE)
pgompertz.ext(q, alpha, lambda, theta, lower.tail = TRUE, log.p = FALSE)
qgompertz.ext(p, alpha, lambda, theta, lower.tail = TRUE, log.p = FALSE)
rgompertz.ext(n, alpha, lambda, theta)
hgompertz.ext(x, alpha, lambda, theta)

Value

  • dgompertz.ext: numeric vector of (log-)densities

  • pgompertz.ext: numeric vector of probabilities

  • qgompertz.ext: numeric vector of quantiles

  • rgompertz.ext: numeric vector of random variates

  • hgompertz.ext: 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 Gompertz Extension distribution is parameterized by the parameters \(\alpha > 0\), \(\lambda > 0\), and \(\theta > 0\).

The Gompertz Extension distribution has CDF:

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

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

The functions available are listed below:

  • dgompertz.ext() — Density function

  • pgompertz.ext() — Distribution function

  • qgompertz.ext() — Quantile function

  • rgompertz.ext() — Random generation

  • hgompertz.ext() — Hazard function

References

Chaudhary, A.K., & Kumar, V. (2020). A Bayesian Estimation and Prediction of Gompertz Extension Distribution Using the MCMC Method. Nepal Journal of Science and Technology(NJST), 19(1), 142--160. tools:::Rd_expr_doi("10.3126/njst.v19i1.29795")

Examples

Run this code
x <- seq(1.0, 10, 0.25)
dgompertz.ext(x, 0.1, 5.0, 2.5)
pgompertz.ext(x, 0.1, 5.0, 2.5)
qgompertz.ext(0.5, 0.1, 5.0, 2.5)
rgompertz.ext(10, 0.1, 5.0, 2.5)
hgompertz.ext(x, 0.1, 5.0, 2.5)

# Data
x <- stress
# ML estimates
params = list(alpha=0.0678, lambda=44.34760, theta=2.5225)
#P–P (probability–probability) plot
pp.plot(x, params = params, pfun = pgompertz.ext, fit.line=TRUE)

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

# Goodness-of-Fit(GoF) and Model Diagnostics 
out <- gofic(x, params = params,
             dfun = dgompertz.ext, pfun=pgompertz.ext, plot=TRUE)
print.gofic(out)

Run the code above in your browser using DataLab