Learn R Programming

NeuDist (version 1.0.1)

LindleyHC: Lindley Half-Cauchy(LHC) Distribution

Description

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

Usage

dlindley.HC(x, lambda, theta, log = FALSE)
plindley.HC(q, lambda, theta, lower.tail = TRUE, log.p = FALSE)
qlindley.HC(p, lambda, theta, lower.tail = TRUE, log.p = FALSE)
rlindley.HC(n, lambda, theta)
hlindley.HC(x, lambda, theta)

Value

  • dlindley.HC: numeric vector of (log-)densities

  • plindley.HC: numeric vector of probabilities

  • qlindley.HC: numeric vector of quantiles

  • rlindley.HC: numeric vector of random variates

  • hlindley.HC: numeric vector of hazard values

Arguments

x, q

numeric vector of quantiles (x, q)

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

The Lindley Half-Cauchy distribution has CDF:

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

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

References

Chaudhary, A.K. & Kumar, V. (2020). Lindley Half Cauchy Distribution: Properties and Applications. International Journal For Research in Applied Science & Engineering Technology (IJRASET), 8(9), 1232--1242. tools:::Rd_expr_doi("10.22214/ijraset.2020.31745")

Examples

Run this code
x <- seq(1, 10, 0.5)
dlindley.HC(x, 0.5, 1.5)
plindley.HC(x, 0.5, 1.5)
qlindley.HC(0.5, 0.5, 1.5)
rlindley.HC(10, 0.5, 1.5)
hlindley.HC(x, 0.5, 1.5)

# Data
x <- reactorpump
# ML estimates
params = list(lambda=0.5479, theta=1.2766)
#P–P (probability–probability) plot
pp.plot(x, params = params, pfun = plindley.HC, fit.line=TRUE)

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

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

Run the code above in your browser using DataLab