ugompertz | R Documentation |
Density function, distribution function, quantile function and random number deviates
for the unit-Gompertz distribution reparametrized in terms of the \tau
-th quantile, \tau \in (0, 1)
.
dugompertz(x, mu, theta, tau = 0.5, log = FALSE)
pugompertz(q, mu, theta, tau = 0.5, lower.tail = TRUE, log.p = FALSE)
qugompertz(p, mu, theta, tau = 0.5, lower.tail = TRUE, log.p = FALSE)
rugompertz(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{\alpha \theta }{x}\exp \left\{ \alpha -\theta \log \left( y\right) -\alpha \exp \left[ -\theta \log \left( y\right) \right] \right\}
Cumulative density function
F(y\mid \alpha ,\theta )=\exp \left[ \alpha \left( 1-y^{\theta }\right) \right]
Quantile Function
Q(\tau \mid \alpha ,\theta )=\left[ \frac{\alpha -\log \left( \tau \right) }{\alpha }\right] ^{-\frac{1}{\theta }}
Reparameterization
\alpha =g^{-1}(\mu )=\frac{\log \left( \tau \right) }{1-\mu ^{\theta }}
dugompertz
gives the density, pugompertz
gives the distribution function,
qugompertz
gives the quantile function and rugompertz
generates random deviates.
Invalid arguments will return an error message.
Josmar Mazucheli jmazucheli@gmail.com
André F. B. Menezes andrefelipemaringa@gmail.com
Mazucheli, J., Menezes, A. F. and Dey, S., (2019). Unit-Gompertz Distribution with Applications. Statistica, 79(1), 25-43.
set.seed(123)
x <- rugompertz(n = 1000, mu = 0.5, theta = 2, tau = 0.5)
R <- range(x)
S <- seq(from = R[1], to = R[2], by = 0.01)
hist(x, prob = TRUE, main = 'unit-Gompertz')
lines(S, dugompertz(x = S, mu = 0.5, theta = 2, tau = 0.5), col = 2)
plot(ecdf(x))
lines(S, pugompertz(q = S, mu = 0.5, theta = 2, tau = 0.5), col = 2)
plot(quantile(x, probs = S), type = "l")
lines(qugompertz(p = S, mu = 0.5, theta = 2, tau = 0.5), col = 2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.