GenGammaDistrib: Generalized Gamma distribution

Description Usage Arguments Details Value References Examples

Description

Density and random generation of the generalized gamma distribution.

Usage

1
2
dggamma(x, shape1, scale, shape2)
rggamma(n, shape1, scale, shape2)

Arguments

x

vector of positive values

n

number of simulated vectors

shape1

overall shape parameter

scale

vector of scales. Should be of the same length as x

shape2

vector of Dirichlet parameters. Should be of the same length as x.

Details

log density at x >0:
log(shape1/scale) - lgamma(shape2) + (shape1*shape2-1)*log(x/scale) - (x/scale)^{shape1}

Value

dggamma: Generalized gamma density evaluated at x

rggamma: Generalized gamma random deviates

References

Stacy, E.W. (1962). "A Generalization of the Gamma Distribution." Annals of Mathematical Statistics 33(3): 1187-1192.

Johnson, N.L.; Kotz, S; Balakrishnan, N. (1994) Continuous Univariate Distributions, Volume 1, 2nd Edition. Wiley. ISBN 0-471-58495-9 (Section 17.8.7)

Examples

1
2
3
4
5
6
7
set.seed(12345)
u1 <- rggamma(10,2,1,1.4) # 10 random deviates with scale 1
set.seed(12345)
u <- rggamma(10,2,1:10,1.4) # 10 random deviates with scale 1:10, repectively
u
u/u1
dggamma(u,2,1:10,1.4)

SGB documentation built on March 26, 2020, 8:02 p.m.