GeoGG: Geometrical Generalized Gamma Distribution

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

Description

Density, distribution function, quantile function and random generation for the GeoGG distribution with parameters tau, alpha, k and pg.

Usage

1
2
3
4
5
6
7
8
9
dgeogg(x, alpha = 1, tau, k, pg, log = FALSE)

pgeogg(q, alpha = 1, tau, k, pg, lower.tail = TRUE, log.p = FALSE)

qgeogg(p, alpha = 1, tau, k, pg, lower.tail = TRUE, log.p = FALSE)

rgeogg(n, alpha = 1, tau, k, pg, cens.prop = 0)

ml.geogg(x, alpha.ini, tau.ini, k.ini, pg.ini)

Arguments

x, q

numeric vector of quantiles.

alpha

scale parameter α from the Generalized Gama (Stacy, 1962), α > 0.

tau

shape parameter τ from the Generalized Gama (Stacy, 1962), τ > 0.

k

shape parameter k from the Generalized Gama (Stacy, 1962), k > 0.

pg

is the probability of success p from the Geometric, 0 < p < 1.

log, log.p

logical; if TRUE, probabilities/densities p are given as log(p).

lower.tail

logical; if TRUE, probabilities are P[X ≤ x], otherwise, P[X ≥ x]

n

desired size of the random number sample.

cens.prop

proportion of censored data to be simulated. If greater than 0, a matrix will be returned instead of a vector. The matrix will contain the random values and a censorship indicator variable.

Details

The GeoGG distribution has density

f(x) = ((τ(1-p))/(α Γ(k)))(x/α))^(τ k-1) e^(-(t/α)^τ)(1 - p*(1-γ(k, (t/α)^τ)))^(-2)

with scale parameter α, shape parameters τ and k and p is the degeneration parameter as described by Ortega et al (2011).

If alpha is not specified it assumes the default value of 1.

With pg = 0 GeoGG equals the Generalized Gamma with parameterizantion described on Stacy's (1962).

When pg = 0 and tau = 1 then it equals a Gama with shape = k and scale = alpha.

With pg = 0 and k = 1 it equals a Weibull with shape = tau and scale = alpha.

Finally, when pg = 0 and tau = k = 1 it becomes the Exponential with rate = 1/alpha.

For the cases described above, when 0 < pg < 1 then the GeoGG will result in the Geometrical Gamma, Geometrical Weibull and Geometrical Exponential, respectively, as described by Ortega et al (2011).

Value

dgeogg gives the density, pgeogg gives the distribution function, qgeogg gives the quantile function, and rgeogg generates random values.

The length of the result is determined by n for rgeogg, 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.

Author(s)

Anderson Neisse <[email protected]>

Source

The source code of all distributions in this package can also be found on the survdistr Github repository.

References

STACY, E. W., et al. A generalization of the gamma distribution. The Annals of mathematical statistics, 1962, 33.3: 1187-1192.

ORTEGA, E. M. M.; CORDEIRO, G. M.; PASCOA, M. A. R. The generalized gamma geometric distribution. Journal of Statistical Theory and Applications, 2011, 10.3: 433-454.

See Also

LINK TO OTHER PACKAGE DISTRIBUTIONS

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
#Equivalency to the Generalized Gamma on it's original parameterization
all.equal(dgeogg(5, alpha = 2, tau = 3, k = 0.5, pg = 0),
          dgengamma.orig(5, shape = 3, scale = 2, k = 0.5))

#Equivalency to the Gamma
all.equal(dgeogg(5, alpha = 2, tau = 1, k = 0.5, pg = 0),
          dgamma(5, shape = 0.5, scale = 2))

#Equivalency to the Weibull
all.equal(dgeogg(5, alpha = 2, tau = 3, k = 1, pg = 0),
          dweibull(5, shape = 3, scale = 2))

#Equivalency to the Exponential
all.equal(dgeogg(5, alpha = 2, tau = 1, k = 1, pg = 0),
          dexp(5, rate = 1/2))

# Generating values and comparing with the function
x <- rgeogg(10000, alpha = 2, tau = 3, k = 0.5, pg = 0.35)
hist(x, probability = T, breaks = 100)
curve(dgeogg(x, alpha = 2, tau = 3, k = 0.5, pg = 0.35),
      from = 0, to = 4, add = T)

aneisse/survdistr documentation built on May 22, 2019, 2:16 p.m.