ghyp-constructors {ghyp}R Documentation

Create generalized hyperbolic distribution objects

Description

Constructor functions for univariate and multivariate generalized hyperbolic distribution objects and their special cases in one of the parametrizations “chi/psi”, “alpha.bar” and “alpha/delta”.

Usage

ghyp(lambda = 0.5, chi = 0.5, psi = 2, mu = 0, sigma = diag(rep(1, length(mu))),
     gamma = rep(0, length(mu)), alpha.bar = NULL, data = NULL)

ghyp.ad(lambda = 0.5, alpha = 1.5, delta = 1, beta = rep(0, length(mu)),
        mu = 0, Delta = diag(rep(1, length(mu))), data = NULL)

hyp(chi = 0.5, psi = 2, mu = 0, sigma = diag(rep(1, length(mu))),
    gamma = rep(0, length(mu)), alpha.bar = NULL, data = NULL)

hyp.ad(alpha = 1.5, delta = 1, beta = rep(0, length(mu)), mu = 0,
       Delta = diag(rep(1, length(mu))), data = NULL)

NIG(chi = 2, psi = 2, mu = 0, sigma = diag(rep(1, length(mu))),
    gamma = rep(0, length(mu)), alpha.bar = NULL, data = NULL)

NIG.ad(alpha = 1.5, delta = 1, beta = rep(0, length(mu)), mu = 0,
       Delta = diag(rep(1, length(mu))), data = NULL)

student.t(nu = 3.5, mu = 0, sigma = diag(rep(1, length(mu))),
          gamma = rep(0, length(mu)), data = NULL)

student.t.ad(lambda = -2, delta = 1, beta = rep(0, length(mu)), mu = 0,
             Delta = diag(rep(1, length(mu))), data = NULL)

VG(lambda = 1, psi = 2*lambda, mu = 0, sigma = diag(rep(1, length(mu))),
   gamma = rep(0, length(mu)), data = NULL)

VG.ad(lambda = 2, alpha = 1.5, beta = rep(0, length(mu)), mu = 0,
      Delta = diag(rep(1, length(mu))), data = NULL)

gauss(mu = 0, sigma = diag(rep(1, length(mu))), data = NULL)

Arguments

lambda Shape parameter. Common for all parametrizations.
nu Shape parameter only used in case of a Student-t distribution in the “chi/psi” and “alpha.bar” parametrization . It determines the degree of freedom.
chi Shape parameter of the “chi/psi” parametrization.
psi Shape parameter of the “chi/psi” parametrization.
alpha Shape parameter of the “alpha/delta” parametrization.
delta Shape parameter of the “alpha/delta” parametrization.
alpha.bar Shape parameter of the “alpha.bar” parametrization. Supplying “alpha.bar” makes the parameters “chi” and “psi” redundant.
mu Location parameter. Either a scalar or a vector. Common for all parametrizations.
sigma Dispersion parameter of the “chi/psi” parametrization. Either a scalar or a matrix.
Delta Dispersion parameter. Must be a matrix with a determinant of 1. This parameter is only used in the multivariate case of the “alpha.beta” parametrization.
gamma Skewness parameter of the “chi/psi” parametrization. Either a scalar or a vector.
beta Skewness parameter of the “alpha/delta” parametrization. Either a scalar or a vector.
data An object coercible to a vector (univariate case) or matrix (multivariate case).

Details

These functions serve as constructors for univariate and multivariate generalized hyperbolic distribution objects and the special cases of the generalized hyperbolic distribution.

ghyp, hyp and NIG can be called either with the “chi/psi” or the “alpha.bar” parametrization. Whenever alpha.bar is not NULL it is assumed that the “alpha.bar” parametrization is used and the parameters “chi” and “psi” become redundant.

ghyp.ad, hyp.ad, NIG.ad, student.t.ad and VG.ad use the “alpha/delta” parametrization. Have a look on the vignette of this package in the doc folder for further information regarding the parametrization and for the domains of variation of the parameters.

Value

An object of class ghyp.

Note

The Student-t parametrization obtained via the “alpha.bar” parametrization slightly differs from the common Student-t parametrization: The parameter sigma denotes the standard deviation in the univariate case and the variance in the multivariate case. Thus, set sigma = sqrt(nu /(nu - 2) in the univariate case to get the same results as with the standard R implementation of the Student-t distribution (see Examples). Have a look on the vignette of this package in the doc folder for further information.

Once an object of class ghyp is created the methods Xghyp have to be used even when the distribution is a special case of the generalized hyperbolic distribution. E.g. do not use dVG. Use dghyp and submit a variance gamma distribution created with VG().

Author(s)

David Luethi

References

ghyp-package vignette in the doc folder or on http://cran.r-project.org/web/packages/ghyp/

See Also

ghyp-class for a summary of generic methods assigned to ghyp objects, coef for switching between different parametrizations, d/p/q/r/ES/gyhp for density, distribution function et cetera, fit.ghypuv and fit.ghypmv for fitting routines.

Examples

  ## alpha.bar parametrization of a univariate generalized hyperbolic distribution
  ghyp(lambda=2, alpha.bar=0.1, mu=0, sigma=1, gamma=0)
  ## lambda/chi parametrization of a univariate generalized hyperbolic distribution
  ghyp(lambda=2, chi=1, psi=0.5, mu=0, sigma=1, gamma=0)
  ## alpha/delta parametrization of a univariate generalized hyperbolic distribution
  ghyp.ad(lambda=2, alpha=0.5, delta=1, mu=0, beta=0)

  ## alpha.bar parametrization of a multivariate generalized hyperbolic distribution
  ghyp(lambda=1, alpha.bar=0.1, mu=2:3, sigma=diag(1:2), gamma=0:1)
  ## lambda/chi parametrization of a multivariate generalized hyperbolic distribution
  ghyp(lambda=1, chi=1, psi=0.5, mu=2:3, sigma=diag(1:2), gamma=0:1)
  ## alpha/delta parametrization of a multivariate generalized hyperbolic distribution
  ghyp.ad(lambda=1, alpha=2.5, delta=1, mu=2:3, Delta=diag(c(1,1)), beta=0:1)

  ## alpha.bar parametrization of a univariate hyperbolic distribution
  hyp(alpha.bar=0.3, mu=1, sigma=0.1, gamma=0)
  ## lambda/chi parametrization of a univariate hyperbolic distribution
  hyp(chi=1, psi=2, mu=1, sigma=0.1, gamma=0)
  ## alpha/delta parametrization of a univariate hyperbolic distribution
  hyp.ad(alpha=0.5, delta=1, mu=0, beta=0)

  ## alpha.bar parametrization of a univariate normal inverse gaussian distribution
  NIG(alpha.bar=0.3, mu=1, sigma=0.1, gamma=0)
  ## lambda/chi parametrization of a univariate normal inverse gaussian distribution
  NIG(chi=1, psi=2, mu=1, sigma=0.1, gamma=0)
  ## alpha/delta parametrization of a univariate normal inverse gaussian distribution
  NIG.ad(alpha=0.5, delta=1, mu=0, beta=0)

  ## alpha.bar parametrization of a univariate variance gamma distribution
  VG(lambda=2, mu=1, sigma=0.1, gamma=0)
  ## alpha/delta parametrization of a univariate variance gamma distribution
  VG.ad(lambda=2, alpha=0.5, mu=0, beta=0)

  ## alpha.bar parametrization of a univariate Student-t distribution
  student.t(nu = 3, mu=1, sigma=0.1, gamma=0)
  ## alpha/delta parametrization of a univariate Student-t distribution
  student.t.ad(lambda=-2, delta=1, mu=0, beta=1)

  ## Obtain equal results as in the R-core parametrization of the Student-t distribution
  nu <- 2.1
  t.obj <- student.t(nu = nu, sigma = sqrt(nu / (nu - 2)))
  dat <- 0.1 * 1:9
  dt(dat, nu)
  dghyp(dat, t.obj)
  pt(dat, nu)
  pghyp(dat, t.obj)

[Package ghyp version 1.5.0 Index]