uweibull {unitquantreg}R Documentation

The unit-Weibull distribution

Description

Density function, distribution function, quantile function and random number generation function for the unit-Weibull distribution reparametrized in terms of the \tau-th quantile, \tau \in (0, 1).

Usage

duweibull(x, mu, theta, tau = 0.5, log = FALSE)

puweibull(q, mu, theta, tau = 0.5, lower.tail = TRUE, log.p = FALSE)

quweibull(p, mu, theta, tau = 0.5, lower.tail = TRUE, log.p = FALSE)

ruweibull(n, mu, theta, tau = 0.5)

Arguments

x, q

vector of positive quantiles.

mu

location parameter indicating the \tau-th quantile, \tau \in (0, 1).

theta

nonnegative shape parameter.

tau

the parameter to specify which quantile use in the parametrization.

log, log.p

logical; If TRUE, probabilities p are given as log(p).

lower.tail

logical; If TRUE, (default), P(X \leq x) are returned, otherwise P(X > x).

p

vector of probabilities.

n

number of observations. If length(n) > 1, the length is taken to be the number required.

Details

Probability density function

f(y\mid \alpha ,\theta )=\frac{\alpha \theta }{y}\left[ -\log (y)\right]^{\theta -1}\exp \left\{ -\alpha \left[ -\log (y)\right]^{\theta }\right\}

Cumulative distribution function

F(y\mid \alpha ,\theta )=\exp \left\{ -\alpha \left[ -\log (y)\right]^{\theta }\right\}

Quantile function

Q\left( \tau \mid \alpha ,\theta \right) =\exp \left\{ -\left[ -\frac{\log (\tau )}{\alpha }\right]^{\frac{1}{\theta }}\right\}

Reparameterization

\alpha =g^{-1}(\mu )=-\frac{\log (\tau )}{[-\log (\mu )]^{\theta}}

Value

duweibull gives the density, puweibull gives the distribution function, quweibull gives the quantile function and ruweibull generates random deviates.

Invalid arguments will return an error message.

Author(s)

Josmar Mazucheli

André F. B. Menezes

References

Mazucheli, J., Menezes, A. F. B and Ghitany, M. E., (2018). The unit-Weibull distribution and associated inference. Journal of Applied Probability and Statistics, 13(2), 1–22.

Mazucheli, J., Menezes, A. F. B., Fernandes, L. B., Oliveira, R. P. and Ghitany, M. E., (2020). The unit-Weibull distribution as an alternative to the Kumaraswamy distribution for the modeling of quantiles conditional on covariates. Journal of Applied Statistics, 47(6), 954–974.

Mazucheli, J., Menezes, A. F. B., Alqallaf, F. and Ghitany, M. E., (2021). Bias-Corrected Maximum Likelihood Estimators of the Parameters of the Unit-Weibull Distribution. Austrian Journal of Statistics, 50(3), 41–53.

Examples

set.seed(6969)
x <- ruweibull(n = 1000, mu = 0.5, theta = 1.5, tau = 0.5)
R <- range(x)
S <- seq(from = R[1], to = R[2], by = 0.01)
hist(x, prob = TRUE, main = 'unit-Weibull')
lines(S, duweibull(x = S, mu = 0.5, theta = 1.5, tau = 0.5), col = 2)
plot(ecdf(x))
lines(S, puweibull(q = S, mu = 0.5, theta = 1.5, tau = 0.5), col = 2)
plot(quantile(x, probs = S), type = "l")
lines(quweibull(p = S, mu = 0.5, theta = 1.5, tau = 0.5), col = 2)

[Package unitquantreg version 0.0.6 Index]