QRM (version 0.4-13)

GHYP: Uni- and Multivariate Generalized Hyperbolic Distribution

Description

Values of density and random number generation for uni- and multivariate Generalized Hyperbolic distribution in new QRM parameterization \((\chi, \psi, \gamma)\) and in standard parametrization \((\alpha, \beta, \delta)\); univariate only. See pp. 77--81 in QRM. The special case of a multivariate symmetric GHYP is implemented seperately as function dsmghyp().

Usage

dghyp(x, lambda, chi, psi, mu = 0, gamma = 0, log = FALSE) 
dmghyp(x, lambda, chi, psi, mu, Sigma, gamma, log = FALSE)
dsmghyp(x, lambda, chi, psi, mu, Sigma, log = FALSE)
dghypB(x, lambda, delta, alpha, beta = 0, mu = 0, log = FALSE) 
rghyp(n, lambda, chi, psi, mu = 0, gamma = 0)
rmghyp(n, lambda, chi, psi, Sigma, mu, gamma)
rghypB(n, lambda, delta, alpha, beta = 0, mu = 0)

Arguments

alpha

numeric, parameter(s).

beta

numeric, skewness parameter.

chi

numeric, mixing parameter(s).

delta

numeric, parameter(s).

gamma

numeric, skewness parameter(s).

lambda

numeric, mixing parameter(s).

log

logical, should log density be returned; default is FALSE.

mu

numeric, location parameter(s).

n

integer, count of random variates.

psi

numeric, mixing parameter(s).

Sigma

matrix, dispersion matrix for multivaraiate GHYP.

x

vector, values to evaluate density.

Value

numeric, value(s) of density or log-density (dghyp, dmghyp, dsmghyp and dghypB) or random sample (rghyp, rmghyp, rghypB)

Details

The univariate QRM parameterization is defined in terms of parameters \(\chi, \psi, \gamma\) instead of the \(\alpha, \beta, \delta\) model used by Blaesild (1981). If \(\gamma = 0\), a normal variance mixture where the mixing variable \(W\) has a Generalized Inverse Gaussian distribution (GIG) with parameters \(\lambda, \chi, \psi\) is given, with heavier tails. If \(\gamma > 0\), a normal mean-variance mixture where the mean is also perturbed to equal \(\mu + (W * \gamma)\) which introduces asymmetry as well, is obtained. Values for \(\lambda\) and \(\mu\) are identical in both QRM and B parameterizations. The dispersion matrix \(\Sigma\) does not appear as argument in the univariate case since its value is identically one.

Examples

Run this code
# NOT RUN {
old.par <- par(no.readonly = TRUE)
par(mfrow = c(2, 2))
ll <- c(-4, 4)
BiDensPlot(func = dmghyp, xpts = ll, ypts = ll, mu = c(0, 0),
           Sigma = equicorr(2, -0.7), lambda = 1, chi = 1, psi = 1,
           gamma = c(0, 0))
BiDensPlot(func = dmghyp, type = "contour", xpts = ll, ypts = ll,
           mu = c(0, 0), Sigma = equicorr(2, -0.7), lambda = 1,
           chi = 1, psi = 1, gamma = c(0, 0))
BiDensPlot(func = dmghyp, xpts = ll, ypts = ll, mu = c(0, 0),
           Sigma = equicorr(2, -0.7), lambda = 1, chi = 1, psi = 1,
           gamma = c(0.5, -0.5))
BiDensPlot(func = dmghyp, type = "contour", xpts = ll, ypts = ll,
           mu = c(0, 0), Sigma = equicorr(2, -0.7), lambda = 1,
           chi = 1, psi = 1, gamma = c(0.5, -0.5))
par(old.par)
# }

Run the code above in your browser using DataCamp Workspace