Learn R Programming

NeuDist (version 1.0.1)

HCInvNHE: Half-Cauchy Inverse NHE Distribution

Description

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

Usage

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

Value

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

  • phc.inv.NHE: numeric vector of probabilities

  • qhc.inv.NHE: numeric vector of quantiles

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

  • hhc.inv.NHE: numeric vector of hazard values

Arguments

x, q

numeric vector of quantiles (x, q)

beta

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

The Half-Cauchy Inverse NHE distribution has CDF:

$$ F(x; \beta, \lambda, \theta) = \quad 1 - \frac{2}{\pi }\arctan \left[ { - \frac{1}{\theta }\left\{ {1 - {{\left( {1 + \frac{\lambda }{x}} \right)}^\beta }} \right\}} \right] \quad ;\;x > 0. $$

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

Included functions are:

  • dhc.inv.NHE() — Density function

  • phc.inv.NHE() — Distribution function

  • qhc.inv.NHE() — Quantile function

  • rhc.inv.NHE() — Random generation

  • hhc.inv.NHE() — Hazard function

References

Chaudhary, A.K., Telee, L.B.S. & Kumar,V. (2022). Half-Cauchy Inverse NHE Distribution: Properties and Applications. Nepal Journal of Mathematical Sciences (NJMS), 3(2), 1--12. tools:::Rd_expr_doi("10.3126/njmathsci.v3i2.49198")

Chaudhary, A. K., Sapkota, L. P., & Kumar, V. (2022). Some properties and applications of half Cauchy extended exponential distribution. Int. J. Stat. Appl. Math., 7(4), 226--235. tools:::Rd_expr_doi("10.22271/maths.2022.v7.i4c.866")

Chaudhary, A.K., & Kumar, V. (2022). Half Cauchy-Modified Exponential Distribution: Properties and Applications. Nepal Journal of Mathematical Sciences (NJMS), 3(1), 47--58. tools:::Rd_expr_doi("10.3126/njmathsci.v3i1.44125")

Examples

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

# Data
x <- relief
# ML estimates
params = list(beta=79.7799, lambda=0.1129, theta=154.1769)
#P–P (probability–probability) plot
pp.plot(x, params = params, pfun = phc.inv.NHE, fit.line=TRUE)

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

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

Run the code above in your browser using DataLab