Description Usage Arguments Details Value Author(s) Source References See Also Examples
Density, distribution function, quantile function and random generation
for the GExp distribution with parameters alpha
, lambda
and mu
.
1 2 3 4 5 6 7 |
x, q |
numeric vector of quantiles. x > μ. |
alpha |
shape parameter α > 0. |
lambda |
shape parameter λ > 0. |
mu |
location parameter μ < x. |
log, log.p |
logical; if |
lower.tail |
logical; if |
n |
desired size of the random number sample. |
cens.prop |
proportion of censored data to be simulated. If greater than |
The GExp distribution has density
f(x) = (α/λ)(1-e^(-(x-μ)/λ))^(α-1)e^(-(x-μ)/λ)
with shape parameter α, scale parameter λ and location parameter μ and x > μ as described by Gupta and Kundu (1999).
With alpha = 1
GExp equals the Two-parameter Exponential distribution
with rate = 1/lambda
. Such dsitribution can be computed by a Exponential
transforming the variable g(x) = x - mu
.
With alpha = 1
and mu = 0
GExp equals the usual Exponential distribution.
dgexp
gives the density, pgexp
gives the distribution
function, qgexp
gives the quantile function, and rgexp
generates random values.
The length of the result is determined by n
for rgexp
, for the other fucntions the
length is the same as the vector passed to the first argument.
Only the first element of the logical arguments are used.
Anderson Neisse <a.neisse@gmail.com>
The source code of all distributions in this package can also be found on the survdistr Github repository.
GUPTA, R. D.; KUNDU, D. Theory & methods: Generalized exponential distributions. Australian & New Zealand Journal of Statistics, 1999, 41.2: 173-188.
LAWLESS, J. F. Prediction intervals for the two parameter exponential distribution. Technometrics, 1977, 19.4: 469-472.
LINK TO OTHER PACKAGE DISTRIBUTIONS
1 2 3 4 5 6 7 8 9 10 11 12 13 | # Equivalency with the Two-parameter Exponential distribution
all.equal(dgexp(5, alpha = 1, lambda = 2, mu = 3),
dexp(5 - 3, rate = 1/2))
# Equivalency with the exponential distribution
all.equal(dgexp(5, alpha = 1, lambda = 2, mu = 0),
dexp(5, rate = 1/2))
# Generating values and comparing with the function
x <- rgexp(10000, alpha = 1.5, lambda = 2, mu = 3)
hist(x, probability = T, ylim = c(0, 0.5), breaks = 100)
curve(dgexp(x, alpha = 1.5, lambda = 2, mu = 3),
from = 0, to = 25, add = T)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.