momRecursion function

Computes the moment coefficients recursively for generalized hyperbolic and related distributions

Computes the moment coefficients recursively for generalized hyperbolic and related distributions

This function computes all of the moments coefficients by recursion based on Scott, and Tran (2008). See Details for the formula.

momRecursion(order = 12, printMatrix = FALSE)

Arguments

  • order: Numeric. The order of the moment coefficients to be calculated. Not permitted to be a vector. Must be a positive whole number except for moments about zero.
  • printMatrix: Logical. Should the coefficients matrix be printed?

Details

The moment coefficients recursively as a1,1=1a_{1,1}=1 and

ak,=ak1,1+(2k+1)ak1, a_{k,\ell} = a_{k-1, \ell-1} + (2 \ell - k + 1) a_{k-1, \ell}%a_{k,l} = a_{k-1,l=1} + (2l - k + 1) a_{k-1,l}

with ak,l=0a_k,l = 0 for c("%", "\n\n", "l<[(k+1)/2] l < [(k + 1)/2]") or l>kl > k

where kk = order, ll is equal to the integers from (k+1)/2(k + 1)/2 to kk.

This formula is given in Scott, and Tran (2008, working paper).

The function also calculates M which is equal to 2lk2l - k. It is a common term which will appear in the formulae for calculating moments of generalized hyperbolic and related distributions.

Returns

  • a: The non-zero moment coefficients for the specified order.

  • l: Integers from (order+1)/2 to order. It is used when computing the moment coefficients and the mu moments.

  • M: The common term used when computing mu moments for generalized hyperbolic and related distributions, M = 2lk2l - k, kk=order

  • lmin: The minimum of ll, which is equal to (order+1)/2.

References

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

Author(s)

David Scott d.scott@auckland.ac.nz , Christine Yang Dong c.dong@auckland.ac.nz

Examples

momRecursion(order = 12) #print out the matrix momRecursion(order = 12, "true")