uweibull: unit-Weibull distribution

Description Usage Arguments Value Author(s) References Examples

Description

Density function, distribution function, quantile function, random number generation function for the unit-Weibull distribution re-parametrized in terms of the τth quantile.

Usage

1
2
3
4
5
6
7
duweibull(x, mu, phi, tau, log = FALSE)

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

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

ruweibull(n, mu, phi, tau)

Arguments

x, q

vector of positive quantiles.

mu

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

phi

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 ≤q 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.

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)

André Felipe B. Menezes andrefelipemaringa@gmail.com

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., Ghitany, M. E., 2020. The unit-Weibull distribution as an alternative to the Kumaraswamy distribution for the modelling of quantiles conditional on covariates. Jounal of Applied Statistics 47 (6), 954–974.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
set.seed(6969)
x <- ruweibull(n = 1000, mu = 0.5, phi = 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 distribution')
lines(S, duweibull(x = S, mu = 0.5, phi = 1.5, tau = 0.5), col = 2)
plot(ecdf(x))
lines(S, puweibull(q = S, mu = 0.5, phi = 1.5, tau = 0.5), col = 2)
plot(quantile(x, probs = S), type = "l")
lines(quweibull(p = S, mu = 0.5, phi = 1.5, tau = 0.5), col = 2)

AndrMenezes/uwquantreg documentation built on July 8, 2020, 2:33 p.m.