Learn R Programming

ghyp (version 0.9.3)

ghyp: 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 = 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 and is defined as -2*lambda.
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.
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
Can be of type vector, matrix or data.frame.

Value

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 can be called either with the chi/psi or the alpha.bar parametrization. When ever alpha.bar is not NULL it is assumed that alpha.bar parameters were supplied. The parametrization of the student.t distribution slightly differs from the common student-t parametrization: The parameter sigma denotes the standard deviation. Have a look on the vignette of this package in the doc folder.

See Also

ghypuv-class, ghypmv-class, fit.ghypuv, fit.ghypmv.

Examples

Run this code
## 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)

Run the code above in your browser using DataLab