Gamma {Distributacalcul}R Documentation

Gamma Distribution

Description

Gamma distribution with shape parameter \alpha and rate parameter \beta.

Usage

expValGamma(shape, rate = 1/scale, scale = 1/rate)

varGamma(shape, rate = 1/scale, scale = 1/rate)

kthMomentGamma(k, shape, rate = 1/scale, scale = 1/rate)

expValLimGamma(d, shape, rate = 1/scale, scale = 1/rate)

expValTruncGamma(d, shape, rate = 1/scale, scale = 1/rate, less.than.d = TRUE)

stopLossGamma(d, shape, rate = 1/scale, scale = 1/rate)

meanExcessGamma(d, shape, rate = 1/scale, scale = 1/rate)

VatRGamma(kap, shape, rate = 1/scale, scale = 1/rate)

TVatRGamma(kap, shape, rate = 1/scale, scale = 1/rate)

mgfGamma(t, shape, rate = 1/scale, scale = 1/rate)

Arguments

shape

shape parameter \alpha, must be positive.

rate

rate parameter \beta, must be positive.

scale

alternative parameterization to the rate parameter, scale = 1 / rate.

k

kth-moment.

d

cut-off value.

less.than.d

logical; if TRUE (default) truncated mean for values <= d, otherwise, for values > d.

kap

probability.

t

t.

Details

The Gamma distribution with shape parameter \alpha and rate parameter \beta has density:

f\left(x\right) = \frac{\beta^{\alpha}}{\Gamma(\alpha)} x^{\alpha - 1}% \textrm{e}^{-\beta x}

for x \in \mathcal{R}^+, \beta, \alpha > 0.

Value

Function :

Invalid parameter values will return an error detailing which parameter is problematic.

Note

Function VatRGamma is a wrapper for the qgamma function stats package.

Examples


# With scale parameter
expValGamma(shape = 3, scale = 4)

# With rate parameter
expValGamma(shape = 3, rate = 0.25)


# With scale parameter
varGamma(shape = 3, scale = 4)

# With rate parameter
varGamma(shape = 3, rate = 0.25)


# With scale parameter
kthMomentGamma(k = 2, shape = 3, scale = 4)

# With rate parameter
kthMomentGamma(k = 2, shape = 3, rate = 0.25)


# With scale parameter
expValLimGamma(d = 2, shape = 3, scale = 4)

# With rate parameter
expValLimGamma(d = 2, shape = 3, rate = 0.25)


# With scale parameter
expValTruncGamma(d = 2, shape = 3, scale = 4)

# With rate parameter
expValTruncGamma(d = 2, shape = 3, rate = 0.25)

# values greather than d
expValTruncGamma(d = 2, shape = 3, rate = 0.25, less.than.d = FALSE)


# With scale parameter
stopLossGamma(d = 2, shape = 3, scale = 4)

# With rate parameter
stopLossGamma(d = 2, shape = 3, rate = 0.25)


# With scale parameter
meanExcessGamma(d = 2, shape = 3, scale = 4)

# With rate parameter
meanExcessGamma(d = 2, shape = 3, rate = 0.25)


# With scale parameter
VatRGamma(kap = .2, shape = 3, scale = 4)

# With rate parameter
VatRGamma(kap = .2, shape = 3, rate = 0.25)


# With scale parameter
TVatRGamma(kap = .2, shape = 3, scale = 4)

# With rate parameter
TVatRGamma(kap = .2, shape = 3, rate = 0.25)


mgfGamma(t = 1, shape = 3, rate = 5)


[Package Distributacalcul version 0.4.0 Index]