Learn R Programming

GeneralizedHyperbolic (version 0.8-4)

momRecursion: Computes the moment coefficients recursively for generalized hyperbolic and related distributions

Description

This function computes all of the moments coefficients by recursion based on Scott, W<U+32D3AF7B>WuertzDetails for the formula.

Usage

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?

Value

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 = \(2\ell - k\), \(k\)=order

lmin

The minimum of \(\ell\), which is equal to (order+1)/2.

Details

The moment coefficients recursively as \(a_{1,1}=1\) and $$a_{k,\ell} = a_{k-1, \ell-1} + (2 \ell - k + 1) a_{k-1, \ell}$$ with \(a_{k,\ell} = 0\) for \(\ell<\lfloor(k+1)/2\rfloor\) or \(\ell>k\) where \(k\) = order, \(\ell\) is equal to the integers from \((k+1)/2\) to \(k\).

This formula is given in Scott, W<U+32D3AF7B>Wuertz working paper).

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

References

Scott, D. J., W<U+32D3AF7B>Wuertz Moments of the Generalized Hyperbolic Distribution. Preprint.

Examples

Run this code
# NOT RUN {
  momRecursion(order = 12)

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

Run the code above in your browser using DataLab