R: Calculate Moments of the Skew Hyperbolic Student...
skewhypMom
R Documentation
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)
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.
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:
where k = order and k > 0 and
a_{k, l} is the recursive coefficient (see
momRecursion for details).
This formula is given in Scott, W<c3><bc>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.
Value
The function returns the moment specified. In the case of raw moments,
Inf is returned if the moment is infinite.