Learn R Programming

SkewHyperbolic (version 0.4-2)

skewhypMom: Calculate Moments of the Skew Hyperbolic Student t-Distribution.

Description

This function can be used to calculate the raw moments, mu moments, central moments, and moments about any other given location for the skew hyperbolic t-distribution.

Usage

skewhypMom(order, mu = 0, delta = 1, beta = 1, nu = 1,
           param = c(mu,delta,beta,nu), momType = "raw", about = 0)

Value

The function returns the moment specified. In the case of raw moments,

Inf is returned if the moment is infinite.

Arguments

order

Numeric. The order of the moment to be calculated. Not permitted to be a vector. Must be a positive integer, except for moments about 0.

mu

Location parameter \(\mu\), default is 0.

delta

Scale parameter \(\delta\), default is 1.

beta

Skewness parameter \(\beta\), default is 1.

nu

Shape parameter \(\nu\), default is 1.

param

Specifying the parameters as a vector of the form c(mu,delta,beta,nu).

momType

Common types of moments to be calculated, default is "raw", see Details.

about

Numeric. The point around which the moment is to be calculated, default is zero. See Details.

Author

David Scott d.scott@auckland.ac.nz, Fiona Grimson

Details

Users may either specify the values of the parameters individually or as a vector. If both forms are specified, then the values specified by the vector param will overwrite the other ones. In addition the parameter values are examined by calling the function skewhypCheckPars to see if they are valid.

order is also checked by calling the function is.wholenumber in the DistributionUtils package to see whether a whole number is given.

momType can be either "raw" (moments about zero), "mu" (moments about mu), or "central" (moments about the mean). If one of these types of moments is required there is no need to specify a value for about. For moments about any other location about must be specified. In the case that both momType and about are specified and contradicting, the function will calculate the moments based on the value of about.

To calculate the moments of the skew hyperbolic t-distribution, the function first calculates the mu moments by the formula defined below, and then transforms them to any of the other types of moment by calling momChangeAbout in the DistributionUtils package.

The mu moments of the skew hyperbolic t-distribution are given by:

$$\bar{M}_k = \sum\limits_{\ell = \lfloor(k+1)/2\rfloor}^{k} a_{k, \ell} \beta^{2\ell - k} \left[\frac{\delta^{2\ell} \Gamma(\nu/2 - \ell)}{ \Gamma(\nu/2) 2^{\ell} }\right]$$

where \(k = \code{order}\) and \(k > 0\) and \(a_{k, \ell}\) is the recursive coefficient (see momRecursion for details).

This formula is given in Scott, Würtz and Tran (2008). Note that the [.] part of this formula is actually equivalent to the formula for the raw moments of the inverse gamma distribution, so the function calls gammaRawMom in the GeneralizedHyperbolic package when implementing the computations.

References

Paolella, Marc S. (2007) Intermediate Probability: A Computational Approach, Chichester: Wiley

Scott, D. J., Würtz, D. and Tran, T. T. (2008) Moments of the Generalized Hyperbolic Distribution. Preprint.

See Also

skewhypCheckPars, skewhypMean, is.wholenumber, momRecursion, momChangeAbout and gigMom.

Examples

Run this code
param = c(1,2,3,10)
##Raw moments of the skew hyperbolic t distribution
skewhypMom(3, param = param, momType = "raw")
##Mu moments
skewhypMom(3, param = param, momType = "mu")
##Central moments
skewhypMom(3, param = param, momType = "central")
##Moments about any location
skewhypMom(3, param = param, about = 5)

Run the code above in your browser using DataLab