Description Usage Arguments Value Author(s) Examples
Density function, distribution function, quantile function, random number generation function for the unit-Gompertz distribution re-parametrized in terms of the mode.
1 2 3 4 5 6 7 | dugompertz(x, mu, phi, log = FALSE)
pugompertz(q, mu, phi, lower.tail = TRUE, log.p = FALSE)
qugompertz(p, mu, phi, lower.tail = TRUE, log.p = FALSE)
rugompertz(n, mu, phi)
|
x, q |
vector of positive quantiles. |
mu |
location parameter indicating the mode. |
phi |
shape parameter. |
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 |
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.
André Felipe B. Menezes andrefelipemaringa@gmail.com
1 2 3 4 5 6 7 8 9 10 | set.seed(6969)
x <- rugompertz(n = 1e4, mu = 0.5, phi = 1.0)
R <- range(x)
S <- seq(from = R[1], to = R[2], by = 0.01)
hist(x, prob = TRUE, main = 'unit-gompertz distribution')
lines(S, dugompertz(x = S, mu = 0.5, phi = 1.0), col = 2)
plot(ecdf(x))
lines(S, pugompertz(q = S, mu = 0.5, phi = 1.0), col = 2)
plot(quantile(x, probs = S), type = "l")
lines(qugompertz(p = S, mu = 0.5, phi = 1.0), col = 2)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.