Learn R Programming

NeuDist (version 1.0.1)

ModUbd: Modified UBD (MUBD) Distribution

Description

Density, distribution function, quantile function, random generation, and hazard rate function for the Modified UBD (MUBD) distribution.

Usage

dmod.ubd(x, alpha, beta, lambda, log = FALSE)
pmod.ubd(q, alpha, beta, lambda, lower.tail = TRUE, log.p = FALSE)
qmod.ubd(p, alpha, beta, lambda, lower.tail = TRUE, log.p = FALSE)
rmod.ubd(n, alpha, beta, lambda)
hmod.ubd(x, alpha, beta, lambda)

Value

dmod.ubd returns the probability density function. pmod.ubd returns the cumulative distribution function. qmod.ubd returns the quantile function. rmod.ubd generates random variates. hmod.ubd returns the hazard rate function.

Arguments

x

Vector of positive quantiles.

alpha

Shape parameter (\(\alpha > 0\)).

beta

Shape parameter (\(\beta > 0\)).

lambda

Scale parameter (\(\lambda > 0\)).

log

Logical; if TRUE, returns the log-density.

q

Vector of positive quantiles.

lower.tail

Logical; if TRUE (default), returns \(P(X \le x)\).

log.p

Logical; if TRUE, probabilities are returned on the log scale.

p

Vector of probabilities.

n

Number of random observations. Must be a positive integer.

Details

The Modified UBD (MUBD) distribution is a flexible lifetime distribution with positive shape parameters \(\alpha > 0\), \(\beta > 0\) and scale parameter \(\lambda > 0\).

The MUDB distribution has CDF:

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

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

References

Chaudhary, A.K., Telee, L. B. S., & Kumar, V. (2023). Modified Upside Down Bathtub-Shaped Hazard Function Distribution: Properties and Applications. Journal of Econometrics and Statistics, 3(1), 107--120.

Examples

Run this code
x <- seq(0.1, 1, by=0.1)
dmod.ubd(x, alpha = 1.5, beta = 1.2, lambda = 2)
pmod.ubd(x, alpha = 1.5, beta = 1.2, lambda = 2)
qmod.ubd(0.5, alpha = 1.5, beta = 1.2, lambda = 2)
rmod.ubd(10, alpha = 1.5, beta = 1.2, lambda = 2)
hmod.ubd(x, alpha = 1.5, beta = 1.2, lambda = 2)

# Data
x <- fibers69
# ML estimates
params = list(alpha=0.8559, beta=3.0133, lambda=7.0336)
#P–P (probability–probability) plot
pp.plot(x, params = params, pfun = pmod.ubd, fit.line=TRUE)

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

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

Run the code above in your browser using DataLab