Learn R Programming

actuar (version 0.9-4)

GammaSupp: Moments and Moment Generating Function of the Gamma Distribution

Description

Raw moments, limited moments and moment generating function for the Gamma distribution with parameters shape and scale.

Usage

mgamma(order, shape, rate = 1, scale = 1/rate)
levgamma(limit, shape, rate = 1, scale = 1/rate, order = 1)
mgfgamma(x, shape, rate = 1, scale = 1/rate, log = FALSE)

Arguments

order
order of the moment.
limit
limit of the loss variable.
rate
an alternative way to specify the scale.
shape, scale
shape and scale parameters. Must be strictly positive.
x
numeric vector.
log
logical; if TRUE, the cumulant generating function is returned.

Value

  • mgamma gives the $k$th raw moment, levgamma gives the $k$th moment of the limited loss variable, and mgfgamma gives the moment generating function in x. Invalid arguments will result in return value NaN, with a warning.

Details

The $k$th raw moment of the random variable $X$ is $E[X^k]$, the $k$th limited moment at some limit $d$ is $E[\min(X, d)^k]$ and the moment generating function is $E[e^{xX}]$.

References

Klugman, S. A., Panjer, H. H. and Willmot, G. E. (2004), Loss Models, From Data to Decisions, Second Edition, Wiley. Johnson, N. L. and Kotz, S. (1970), Continuous univariate distributions, Volume 1, Wiley.

See Also

GammaDist

Examples

Run this code
mgamma(2, 3, 4) - mgamma(1, 3, 4)^2
levgamma(10, 3, 4, order = 2)
mgfgamma(1,3,2)

Run the code above in your browser using DataLab