Learn R Programming

reliaR (version 0.01)

FlexWeibull: The flexible Weibull(FW) distribution

Description

Density, distribution function, quantile function and random generation for the flexible Weibull(FW) distribution with parameters alpha and beta.

Usage

dflex.weibull(x, alpha, beta, log = FALSE) pflex.weibull(q, alpha, beta, lower.tail = TRUE, log.p = FALSE) qflex.weibull(p, alpha, beta, lower.tail = TRUE, log.p = FALSE) rflex.weibull(n, alpha, beta)

Arguments

x,q
vector of quantiles.
p
vector of probabilities.
n
number of observations. If length(n) > 1, the length is taken to be the number required.
alpha
parameter.
beta
parameter.
log, log.p
logical; if TRUE, probabilities p are given as log(p).
lower.tail
logical; if TRUE (default), probabilities are $P[X \le x]$ otherwise, $P[X > x]$.

Value

dflex.weibull gives the density, pflex.weibull gives the distribution function, qflex.weibull gives the quantile function, and rflex.weibull generates random deviates.

Details

The flexible Weibull(FW) distribution has density $$f(x) = \left(\alpha + \frac{\beta}{x^2}\right) \exp\left(\alpha \, x - \frac{\beta}{x}\right)\, \exp\left\{-\exp\left(\alpha x - \frac{\beta}{x}\right)\right\};\, x \ge 0, \alpha > 0, \beta > 0.$$ where $\alpha$ and $\beta$ are the shape and scale parameters, respectively.

References

Bebbington, M., Lai, C.D. and Zitikis, R. (2007). A flexible Weibull extension, Reliability Engineering and System Safety, 92, 719-726.

See Also

.Random.seed about random number; sflex.weibull for flexible Weibull(FW) survival / hazard etc. functions

Examples

Run this code
## Load data sets
data(repairtimes)
## Maximum Likelihood(ML) Estimates of alpha & beta for the data(repairtimes)
## Estimates of alpha & beta using 'maxLik' package
## alpha.est = 0.07077507, beta.est = 1.13181535

dflex.weibull(repairtimes, 0.07077507, 1.13181535, log = FALSE)
pflex.weibull(repairtimes, 0.07077507, 1.13181535, lower.tail = TRUE, log.p = FALSE)
qflex.weibull(0.25, 0.07077507, 1.13181535, lower.tail=TRUE, log.p = FALSE)
rflex.weibull(30, 0.07077507, 1.13181535)

Run the code above in your browser using DataLab