Learn R Programming

NeuDist (version 1.0.1)

PoissonGPZ: Poisson-Gompertz Distribution

Description

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

Usage

dpois.gpz(x, alpha, beta, lambda, log = FALSE)
ppois.gpz(q, alpha, beta, lambda, lower.tail = TRUE, log.p = FALSE)
qpois.gpz(p, alpha, beta, lambda, lower.tail = TRUE, log.p = FALSE)
rpois.gpz(n, alpha, beta, lambda)
hpois.gpz(x, alpha, beta, lambda)

Value

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

  • ppois.gpz: numeric vector of probabilities

  • qpois.gpz: numeric vector of quantiles

  • rpois.gpz: numeric vector of random variates

  • hpois.gpz: numeric vector of hazard values

Arguments

x, q

numeric vector of quantiles (x, q)

alpha

positive numeric parameter

beta

positive numeric parameter

lambda

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 Poisson-Gompertz distribution is parameterized by the parameters \(\alpha > 0\), \(\beta > 0\), and \(\lambda > 0\).

The Poisson-Gompertz distribution has CDF:

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

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

The functions available are listed below:

  • dpois.gpz() — Density function

  • ppois.gpz() — Distribution function

  • qpois.gpz() — Quantile function

  • rpois.gpz() — Random generation

  • hpois.gpz() — Hazard function

References

Chaudhary,A.K., Sapkota,L.P., & Kumar, V. (2021). Poisson Gompertz Distribution with Properties and Applications. International Journal of Applied Engineering Research (IJEAR), 16(1),75--84. tools:::Rd_expr_doi("10.37622/IJAER/16.1.2021.75-84")

Examples

Run this code
x <- seq(0.1, 2.0, 0.2)
dpois.gpz(x, 2.0, 0.5, 0.2)
ppois.gpz(x, 2.0, 0.5, 0.2)
qpois.gpz(0.5, 2.0, 0.5, 0.2)
rpois.gpz(10, 2.0, 0.5, 0.2)
hpois.gpz(x, 2.0, 0.5, 0.2)

# Data
x <- stress
# ML estimates
params = list(alpha=0.2211, beta=0.6540, lambda=6.5456)
#P–P (probability–probability) plot
pp.plot(x, params = params, pfun = ppois.gpz, fit.line=TRUE)

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

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

Run the code above in your browser using DataLab