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.
skewhypMom(order, mu = 0, delta = 1, beta = 1, nu = 1,
param = c(mu,delta,beta,nu), momType = "raw", about = 0)
The function returns the moment specified. In the case of raw moments,
Inf
is returned if the moment is infinite.
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.
Location parameter \(\mu\), default is 0.
Scale parameter \(\delta\), default is 1.
Skewness parameter \(\beta\), default is 1.
Shape parameter \(\nu\), default is 1.
Specifying the parameters as a vector of the form
c(mu,delta,beta,nu)
.
Common types of moments to be calculated, default is
"raw"
, see Details.
Numeric. The point around which the moment is to be calculated, default is zero. See Details.
David Scott d.scott@auckland.ac.nz, Fiona Grimson
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.
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.
skewhypCheckPars
, skewhypMean
,
is.wholenumber
,
momRecursion
,
momChangeAbout
and
gigMom
.
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