zouweibull: Zero-or-One unit-Weibull distribution

Description Usage Arguments Value Author(s) References See Also Examples

Description

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

Usage

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

pzouweibull(q, mu, phi, tau, nu, inflation, lower.tail = TRUE, log.p = FALSE)

qzouweibull(p, mu, phi, tau, nu, inflation, lower.tail = TRUE, log.p = FALSE)

rzouweibull(n, mu, phi, tau, nu, inflation)

Arguments

x, q

vector of positive quantiles.

mu

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

phi

nonnegative shape parameter.

tau

the parameter to specify which quantile use in the parametrization.

nu

probability of inflation.

inflation

specify the zero (0) or the one (1) inflation.

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

dzouweibull gives the density, pzouweibull gives the distribution function, qzouweibull gives the quantile function and rzouweibull 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.

See Also

uweibull.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
set.seed(6969)
x <- rzouweibull(n = 1e4, mu = 0.5, phi = 1.5, tau = 0.5, nu = 0.3, inflation = 1)
R <- range(x)
S <- seq(from = R[1], to = R[2], l = 1000)
plot(ecdf(x))
lines(S, pzouweibull(q = S, mu = 0.5, phi = 1.5, tau = 0.5, nu = 0.3, inflation = 1), col = 2)
plot(quantile(x, probs = S), type = "l")
lines(qzouweibull(p = S, mu = 0.5, phi = 1.5, tau = 0.5, nu = 0.3, inflation = 1), col = 2)

probs <- c(0.1, 0.2, 0.5, 0.7, 0.9)
(p <- pzouweibull(q = probs, mu = 0.1, phi = 2, tau = 0.5, nu = 0.5, inflation = 1))
qzouweibull(p, mu = 0.1, phi = 2, tau = 0.5, nu = 0.5, inflation = 1)

(p <- pzouweibull(q = probs, mu = 0.1, phi = 2, tau = 0.5, nu = 0.5, inflation = 0))
qzouweibull(p, mu = 0.1, phi = 2, tau = 0.5, nu = 0.5, inflation = 0)

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