| leeg | R Documentation | 
Density function, distribution function, quantile function and random number generation function
for the Log-extended exponential-geometric distribution reparametrized in terms of the \tau-th quantile, \tau \in (0, 1).
dleeg(x, mu, theta, tau = 0.5, log = FALSE)
pleeg(q, mu, theta, tau = 0.5, lower.tail = TRUE, log.p = FALSE)
qleeg(p, mu, theta, tau = 0.5, lower.tail = TRUE, log.p = FALSE)
rleeg(n, mu, theta, tau = 0.5)
x, q | 
 vector of positive quantiles.  | 
mu | 
 location parameter indicating the   | 
theta | 
 nonnegative shape parameter.  | 
tau | 
 the parameter to specify which quantile is to be used.  | 
log, log.p | 
 logical; If TRUE, probabilities p are given as log(p).  | 
lower.tail | 
 logical; If TRUE, (default),   | 
p | 
 vector of probabilities.  | 
n | 
 number of observations. If   | 
Probability density function
f(y\mid \alpha ,\theta )=\frac{\theta \left( 1+\alpha \right) y^{\theta -1}}{\left( 1+\alpha y^{\theta }\right) ^{2}}
Cumulative distribution function
F(y\mid \alpha ,\theta )=\frac{\left( 1+\alpha \right) y^{\theta }}{1+\alpha y^{\theta }}
Quantile function
Q(\tau \mid \alpha ,\theta )=\left[ \frac{\tau }{1+\alpha \left( 1-\tau\right) }\right] ^{\frac{1}{\theta }}
Reparameterization
\alpha=g^{-1}(\mu )=-\frac{1-\tau \mu ^{\theta }}{\left( 1-\tau \right) }
dleeg gives the density, pleeg gives the distribution function,
qleeg gives the quantile function and rleeg generates random deviates.
Invalid arguments will return an error message.
Josmar Mazucheli jmazucheli@gmail.com
André F. B. Menezes andrefelipemaringa@gmail.com
Jodrá, P. and Jiménez-Gamero, M. D., (2020). A quantile regression model for bounded responses based on the exponential-geometric distribution. Revstat - Statistical Journal, 18(4), 415–436.
set.seed(123)
x <- rleeg(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 = 'Log-extended exponential-geometric')
lines(S, dleeg(x = S, mu = 0.5, theta = 1.5, tau = 0.5), col = 2)
plot(ecdf(x))
lines(S, pleeg(q = S, mu = 0.5, theta = 1.5, tau = 0.5), col = 2)
plot(quantile(x, probs = S), type = "l")
lines(qleeg(p = S, mu = 0.5, theta = 1.5, tau = 0.5), col = 2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.