Learn R Programming

NeuDist (version 1.0.1)

InvUBD: Inverse Upside Down Bathtub-shaped Hazard Function Distribution

Description

Provides density, distribution, quantile, random generation, and hazard functions for the Inverse Upside Down Bathtub-shaped Hazard Function distribution.

Usage

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

Value

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

  • pinv.ubd: numeric vector of probabilities

  • qinv.ubd: numeric vector of quantiles

  • rinv.ubd: numeric vector of random variates

  • hinv.ubd: numeric vector of hazard values

Arguments

x, q

numeric vector of quantiles (x, q)

alpha

positive numeric parameter

beta

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 Upside Down Bathtub-shaped Hazard Function distribution is parameterized by the parameters \(\alpha > 0\), \(\beta > 0\), and \(\lambda > 0\).

The Inverse Upside Down Bathtub-shaped Hazard Function distribution has CDF:

$$ F(x;\,\alpha,\beta,\lambda) = \, \exp \left[ {1 - {{\left( {1 + \lambda {x^{ - \beta }}} \right)}^\alpha }} \right], \quad x > 0. $$

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

The functions available are listed below:

  • dinv.ubd() — Density function

  • pinv.ubd() — Distribution function

  • qinv.ubd() — Quantile function

  • rinv.ubd() — Random generation

  • hinv.ubd() — Hazard function

References

Dimitrakopoulou, T., Adamidis, K., & Loukas, S.(2007). A liftime distribution with an upside down bathtub-shaped hazard function, IEEE Trans. on Reliab., 56(2), 308--311.

Joshi, R.K., & Kumar, V. (2018). Inverse Upside Down Bathtub-Shaped Hazard Function distribution: Theory and Applications. Journal of National Academy of Mathematics, 32, 6--20.

Examples

Run this code
x <- seq(0.1, 1, 0.1)
dinv.ubd(x, 1.5, 0.8, 2)
pinv.ubd(x, 1.5, 0.8, 2)
qinv.ubd(0.5, 1.5, 0.8, 2)
rinv.ubd(10, 1.5, 0.8, 2)
hinv.ubd(x, 1.5, 0.8, 2)

#Data
x <- rainfall
#ML Estimates    
params = list(alpha =0.1804, beta=4.3216, lambda=85.13)
#P–P (probability–probability) plot
pp.plot(x, params = params, pfun = pinv.ubd, fit.line=TRUE)

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

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

Run the code above in your browser using DataLab