Learn R Programming

fGarch (version 4033.92)

absMoments: Absolute moments of GARCH distributions

Description

Computes absolute moments of the standard normal, standardized GED, and standardized skew Student-t distributions.

Usage

absMoments(n, density = c("dnorm", "dged", "dstd"), ...)

Value

a numeric vector

Arguments

n

the order of the absolute moment, can be a vector to compute several absolute moments at once.

density

a character string naming a symmetric density function.

...

parameters passed to the density function.

Author

Diethelm Wuertz for the Rmetrics R-port

Details

absMoments returns a numeric vector of length n with the values of the absolute moments, as specified by n, of the selected probability density function (pdf).

If density names one of the densities in the signature of absMoments, the moments are calculated from known formulas.

Otherwise, numerical integration is used and an attribute is attached to the results to report an estimate of the error. Note that the density is assumed symmetric wihtout a check.

References

Fernandez C., Steel M.F.J. (2000); On Bayesian Modelling of Fat Tails and Skewness, Preprint, 31 pages.

See Also

ged, std

Examples

Run this code
## absMoment -

absMoments(1, "dstd", nu = 6)
absMoments(1, "dstd", nu = 600)
absMoments(1, "dstd", nu = 60000)
absMoments(1, "dstd", nu = 600000)

absMoments(1, "dnorm")

## excess kurtosis of t_nu is  6/(nu - 4)
nu <- 6
absMoments(2*2, "dstd", nu = nu) / absMoments(2*1, "dstd", nu = nu)^2 - 3
6/(nu-4)

## 4th moment for t_4 is infinite
absMoments(4, "dstd", nu = 4)

absMoments(1, "dged", nu = 4)

Run the code above in your browser using DataLab