Learn R Programming

NeuDist (version 1.0.1)

HCNHE: Half-Cauchy NHE Distribution

Description

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

Usage

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

Value

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

  • phc.NHE: numeric vector of probabilities

  • qhc.NHE: numeric vector of quantiles

  • rhc.NHE: numeric vector of random variates

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

The Half-Cauchy NHE distribution has CDF:

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

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

The implementation includes the following functions:

  • dhc.NHE() — Density function

  • phc.NHE() — Distribution function

  • qhc.NHE() — Quantile function

  • rhc.NHE() — Random generation

  • hhc.NHE() — Hazard function

References

Chaudhary, A. K., & Kumar, V.(2021). Arctan Exponential Extension Distribution with Properties and Applications. International Journal of Applied Research (IJAR), 7(1), 432--442. tools:::Rd_expr_doi("10.22271/allresearch.2021.v7.i1f.8251")

Telee, L. B. S., & Kumar, V. (2022). Some properties and applications of half-Cauchy exponential extension distribution. Int. J. Stat. Appl. Math., 7(6), 91--101. tools:::Rd_expr_doi("10.22271/maths.2022.v7.i6b.902")

Kumar, V. (2010). Bayesian analysis of exponential extension model. J. Nat. Acad. Math., 24, 109-128.

Examples

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

# Data
x <- stress66
# ML estimates
params = list(beta=95.2115, lambda=0.0184, theta=118.0656)
#P–P (probability–probability) plot
pp.plot(x, params = params, pfun = phc.NHE, fit.line=TRUE)

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

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

Run the code above in your browser using DataLab