Learn R Programming

NeuDist (version 1.0.1)

InvPowerCauchy: Inverse Power Cauchy Distribution

Description

Provides density, distribution, quantile, random generation, and hazard functions for the Inverse Power Cauchy distribution.

Usage

dinv.pow.cauchy(x, alpha, lambda, log = FALSE)
pinv.pow.cauchy(q, alpha, lambda, lower.tail = TRUE, log.p = FALSE)
qinv.pow.cauchy(p, alpha, lambda, lower.tail = TRUE, log.p = FALSE)
rinv.pow.cauchy(n, alpha, lambda)
hinv.pow.cauchy(x, alpha, lambda)

Value

  • dinv.pow.cauchy: numeric vector of (log-)densities

  • pinv.pow.cauchy: numeric vector of probabilities

  • qinv.pow.cauchy: numeric vector of quantiles

  • rinv.pow.cauchy: numeric vector of random variates

  • hinv.pow.cauchy: numeric vector of hazard values

Arguments

x, q

numeric vector of quantiles (x, q)

alpha

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 Inverse Power Cauchy distribution is parameterized by the parameters \(\alpha > 0\) and \(\lambda > 0\).

The Inverse Power Cauchy distribution has CDF:

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

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

The following functions are included:

  • dinv.pow.cauchy() — Density function

  • pinv.pow.cauchy() — Distribution function

  • qinv.pow.cauchy() — Quantile function

  • rinv.pow.cauchy() — Random generation

  • hinv.pow.cauchy() — Hazard function

References

Sapkota L. P., & Kumar V. (2023). Applications and Some Characteristics of Inverse Power Cauchy Distribution. Reliability: Theory & Applications. 18, 1(72), 301--315. tools:::Rd_expr_doi("10.24412/1932-2321-2023-172-301-315")

Chaudhary, A.K., Sapkota, L.P., & Kumar, V. (2020). Truncated Cauchy Power–Inverse Exponential distribution: Theory and Applications. IOSR Journal of Mathematics (IOSR-JM), 16(4), Ser.IV, 12--23.

Examples

Run this code
x <- seq(0.1, 10, 0.2)
dinv.pow.cauchy(x, 2.0, 5.0)
pinv.pow.cauchy(x, 2.0, 5.0)
qinv.pow.cauchy(0.5, 2.0, 5.0)
rinv.pow.cauchy(10, 2.0, 5.0)
hinv.pow.cauchy(x, 2.0, 5.0)

# Data
x <- headneck44
# ML estimates
params = list(alpha=1.4271, lambda=123.5294)
#P–P (probability–probability) plot
pp.plot(x, params = params, pfun = pinv.pow.cauchy, fit.line=TRUE)

#Q-Q (quantile–quantile) plot 
qq.plot(x, params = params, qfun = qinv.pow.cauchy, fit.line=TRUE)

# Goodness-of-Fit(GoF) and Model Diagnostics 
res <- gofic(x, params = params,
             dfun = dinv.pow.cauchy, pfun=pinv.pow.cauchy, plot=FALSE)
print.gofic(res)

Run the code above in your browser using DataLab