Learn R Programming

NeuDist (version 1.0.1)

HCInvGPZ: Half-Cauchy Inverse Gompertz Distribution

Description

Provides density, distribution, quantile, random generation, and hazard functions for the Half-Cauchy Inverse Gompertz distribution.

Usage

dhc.inv.gpz(x, alpha, lambda, theta, log = FALSE)
phc.inv.gpz(q, alpha, lambda, theta, lower.tail = TRUE, log.p = FALSE)
qhc.inv.gpz(p, alpha, lambda, theta, lower.tail = TRUE, log.p = FALSE)
rhc.inv.gpz(n, alpha, lambda, theta)
hhc.inv.gpz(x, alpha, lambda, theta)

Value

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

  • phc.inv.gpz: numeric vector of probabilities

  • qhc.inv.gpz: numeric vector of quantiles

  • rhc.inv.gpz: numeric vector of random variates

  • hhc.inv.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 Half-Cauchy Inverse Gompertz distribution is parameterized by the parameters \(\alpha > 0\), \(\lambda > 0\), and \(\theta > 0\).

The Half-Cauchy Inverse Gompertz distribution has CDF:

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

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

The implementation includes the following functions:

  • dhc.inv.gpz() — Density function

  • phc.inv.gpz() — Distribution function

  • qhc.inv.gpz() — Quantile function

  • rhc.inv.gpz() — Random generation

  • hhc.inv.gpz() — Hazard function

References

Chaudhary, A. K., Yadav, R. S., & Kumar, V. (2022). Half-Cauchy Inverse Gompertz distribution: Theory and applications. International Journal of Statistics and Applied Mathematics, 7(5), 94--102. tools:::Rd_expr_doi("10.22271/maths.2022.v7.i5b.885")

Examples

Run this code
x <- seq(1.0, 10, 0.25)
dhc.inv.gpz(x, 2.0, 0.5, 2.5)
phc.inv.gpz(x, 2.0, 0.5, 2.5)
qhc.inv.gpz(0.5, 2.0, 0.5, 2.5)
rhc.inv.gpz(10, 2.0, 0.5, 2.5)
hhc.inv.gpz(x, 2.0, 0.5, 2.5)

# Data
x <- relief
# ML estimates
params = list(alpha=9.0830, lambda=0.8369, theta=17.9925)
#P–P (probability–probability) plot
pp.plot(x, params = params, pfun = phc.inv.gpz, fit.line=TRUE)

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

# Goodness-of-Fit(GoF) and Model Diagnostics 
out <- gofic(x, params = params,
             dfun = dhc.inv.gpz, pfun=phc.inv.gpz, plot=TRUE)
print.gofic(out)

Run the code above in your browser using DataLab