ghyp {ghyp} | R Documentation |
Constructor function for univariate and multivariate generalized hyperbolic objects and its special cases.
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)
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 . |
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.
An object of class ghypuv
or ghypmv
.
The “alpha.bar” parametrization yields to a slightly different student-t parametrization:
The parameter sigma
denotes the variance in the multivariate case and
the standard deviation in the univariate 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.
Once an object of class ghypuv
or
ghypmv
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
.
David Lüthi
ghypuv-class
, ghypmv-class
,
fit.ghypuv
, fit.ghypmv
.
## 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)