Learn R Programming

NeuDist (version 1.0.1)

LindleyInvExp: Lindley Inverse Exponential Distribution

Description

Provides density, distribution, quantile, random generation, and hazard functions for the Lindley Inverse Exponential distribution.

Usage

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

Value

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

  • plindley.inv.exp: numeric vector of probabilities

  • qlindley.inv.exp: numeric vector of quantiles

  • rlindley.inv.exp: numeric vector of random variates

  • hlindley.inv.exp: 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 Inverse Exponential distribution is parameterized by the parameters \(\lambda > 0\), and \(\theta > 0\).

The Lindley Inverse Exponential distribution has CDF:

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

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

The following functions are included:

  • dlindley.inv.exp() — Density function

  • plindley.inv.exp() — Distribution function

  • qlindley.inv.exp() — Quantile function

  • rlindley.inv.exp() — Random generation

  • hlindley.inv.exp() — Hazard function

References

Chaudhary,A.K., & Kumar, V. (2020). Lindley Inverse Exponential Distribution With Properties and Applications. Bulletin of Mathematics and Statistics Research (BOMSR), 8(4), 1--13.

Examples

Run this code
x <- seq(5, 10, 0.5)
dlindley.inv.exp(x, 1.5, 5.0)
plindley.inv.exp(x, 1.5, 5.0)
qlindley.inv.exp(0.5, 1.5, 5.0)
rlindley.inv.exp(10, 1.5, 5.0)
hlindley.inv.exp(x, 1.5, 5.0)

# Data
x <- conductors
# ML estimates
params = list(lambda=33.8992, theta=96.0743)
#P–P (probability–probability) plot
pp.plot(x, params = params, pfun = plindley.inv.exp, fit.line=TRUE)

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

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

Run the code above in your browser using DataLab