This function can be used to calculate raw moments, mu moments, central moments and moments about any other given location for the variance gamma (VG) distribution.
vgMom(order, vgC = 0, sigma = 1, theta = 0, nu = 1,
param = c(vgC,sigma,theta,nu), momType = "raw", about = 0)
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 whole number except for moments about zero.
The location parameter \(c\), default is 0.
The spread parameter \(\sigma\), default is 1, must be positive.
The asymmetry parameter \(\theta\), default is 0.
The shape parameter \(\nu\), default is 1, must be positive.
Specifying the parameters as a vector which takes the form
c(vgC,sigma,theta,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 0. See Details.
David Scott d.scott@auckland.ac.nz, Christine Yang Dong c.dong@auckland.ac.nz
For the parameters of the variance gamma distribution, users may
either specify the values individually or as a vector. If both forms
are specified but with different values, then the values specified by
vector param
will always overwrite the other ones. In
addition, the parameters values are examined by calling the function
vgCheckPars
to see if they are valid for the VG distribution.
order
is also checked by calling the function
is.wholenumber
in DistributionUtils
package to see whether
a whole number is given.
momType
can be either "raw" (moments about zero), "mu"
(moments about vgC), or "central" (moments about mean). If one of
these moment types is specified, then there is no need to specify the
about
value. For moments about any other location, the
about
value must be specified. In the case that both
momType
and about
are specified and contradicting, the
function will always calculate the moments based on about
rather than momType
.
To calculate moments of the VG distribution, the function first
calculates mu moments by the formula defined below and then transforms mu
moments to central moments or raw moments or moments about any other
location as required by calling momChangeAbout
in
DistributionUtils
package.
To calculate mu moments of the variance gamma distribution, the function
first transforms the parameterization of
\(c,\sigma,\theta,\nu\) to the generalized hyperbolic
distribution's parameterization of
\(\lambda, \alpha, \beta, \mu\)
(see vgChangePars
for details).
Then, the mu moments of the variance gamma distribution are given by
$$\sum_{\ell = \lfloor(k+1)/2\rfloor}^{k}
a_{k, \ell}
\beta^{2\ell - k}
\lfloor\Gamma(\lambda+\ell)/\Gamma(\lambda)
2^\ell/(\alpha^2-\beta^2)^\ell\rfloor$$
where \(k = \code{order}\) and \(k > 0\) and
\(a_{k, \ell}\) is the recursive coefficient
(see momRecursion
for details).
This formula is developed from the mu moments formula of the
generalized hyperbolic distribution given in Scott,
Würtz and Tran (2008). Note that the part in []
of this equation is actually equivalent to the formula of raw moments
of the gamma distribution. So the function calls gammaRawMom
in
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.
vgCheckPars
, vgChangePars
,
vgMean
,
vgVar
, vgSkew
, vgKurt
,
is.wholenumber
,
momRecursion
,
momChangeAbout
and
momIntegrated
.
### Raw moments of the VG distribution
vgMom(3, param=c(2,1,2,1), momType = "raw")
### Mu moments of the VG distribution
vgMom(2, param=c(2,1,2,1), momType = "mu")
### Central moments of the VG distribution
vgMom(4, param=c(2,1,2,1), momType = "central")
### Moments about any locations
vgMom(4, param=c(2,1,2,1), about = 1)
Run the code above in your browser using DataLab