ghyp-constructors {ghyp}R Documentation

Create generalized hyperbolic distribution objects

Description

Constructor function for univariate and multivariate generalized hyperbolic objects and its special cases.

Usage

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

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

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

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

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

Arguments

lambda Shape parameter.
nu Shape parameter only used in case of a student-t distribution. It determines the degree of freedom.
chi Shape parameter of the alternative “chi/psi” parametrization.
psi Shape parameter of the alternative “chi/psi” parametrization.
alpha.bar Shape parameter of the alternative “alpha.bar” parametrization. Supplying “alpha.bar” makes the parameters “chi” and “psi” redundant.
mu Location parameter. Either a scalar or a vector.
sigma Dispersion parameter. Either a scalar or a matrix.
gamma Skewness parameter. Either a scalar or a vector.
data An object coercible to a vector (univariate case) or matrix (multivariate case).

Details

This function serves as a constructor 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. When ever alpha.bar is not NULL it is assumed that the “alpha.bar” parametrization is used and the parameters “chi” and “psi” become redundant.

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. Have a look on the vignette of this package in the doc folder.

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 Lüthi

See Also

ghyp-class for a summary of generic methods belonging to ghyp objects, fit.ghypuv and fit.ghypmv for fitting routines.

Examples

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

  ## 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.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.bar parametrization of a univariate variance gamma distribution   
  VG(lambda=2, mu=1, sigma=0.1, gamma=0)
  
  ## alpha.bar parametrization of a univariate student-t distribution 
  student.t(nu = 3, mu=1, sigma=0.1, gamma=0)

[Package ghyp version 1.0.0 Index]