Moment Generating Function (MGF) of the Gamma distribution with shape parameter \(\alpha\) and rate parameter \(\beta\).

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

Arguments

t

t.

shape

shape parameter \(\alpha\), must be positive integer.

rate

\(\beta\) is the rate parameter, must be positive.

scale

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

Value

Function :

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

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\).

See also

Examples

MGF_gamma(t = 1, shape = 3, rate = 5)
#> [1] 1.953125