Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

ChisqSupp

Moments and Moment Generating Function of the (non-central) Chi-Squared Distribution


Description

Raw moments, limited moments and moment generating function for the chi-squared (chi^2) distribution with df degrees of freedom and optional non-centrality parameter ncp.

Usage

mchisq(order, df, ncp = 0)
levchisq(limit, df, ncp = 0, order = 1)
mgfchisq(t, df, ncp = 0, log= FALSE)

Arguments

order

order of the moment.

limit

limit of the loss variable.

df

degrees of freedom (non-negative, but can be non-integer).

ncp

non-centrality parameter (non-negative).

t

numeric vector.

log

logical; if TRUE, the cumulant generating function is returned.

Details

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

Only integer moments are supported for the non central Chi-square distribution (ncp > 0).

The limited expected value is supported for the centered Chi-square distribution (ncp = 0).

Value

mchisq gives the kth raw moment, levchisq gives the kth moment of the limited loss variable, and mgfchisq gives the moment generating function in t.

Invalid arguments will result in return value NaN, with a warning.

Author(s)

Christophe Dutang, Vincent Goulet vincent.goulet@act.ulaval.ca

References

Klugman, S. A., Panjer, H. H. and Willmot, G. E. (2012), Loss Models, From Data to Decisions, Fourth Edition, Wiley.

Johnson, N. L. and Kotz, S. (1970), Continuous Univariate Distributions, Volume 1, Wiley.

See Also

Examples

mchisq(2, 3, 4)
levchisq(10, 3, order = 2)
mgfchisq(0.25, 3, 2)

actuar

Actuarial Functions and Heavy Tailed Distributions

v3.1-2
GPL (>= 2)
Authors
Vincent Goulet [cre, aut], Sébastien Auclair [ctb], Christophe Dutang [aut], Nicholas Langevin [ctb], Xavier Milhaud [ctb], Tommy Ouellet [ctb], Alexandre Parent [ctb], Mathieu Pigeon [aut], Louis-Philippe Pouliot [ctb], Jeffrey A. Ryan [aut] (Package API), Robert Gentleman [aut] (Parts of the R to C interface), Ross Ihaka [aut] (Parts of the R to C interface), R Core Team [aut] (Parts of the R to C interface), R Foundation [aut] (Parts of the R to C interface)
Initial release
2021-03-30

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.