coef-methods {ghyp}R Documentation

Extract parameters of generalized hyperbolic distribution objects

Description

The function coef reutrns the parameters of a generalized hyperbolic distribution object as a list. The user can choose between the “chi/psi” and the “alpha.bar” parametrization. The function coefficients is a synonym for coef.

Usage

## S4 method for signature 'ghyp':
coef(object, type = c("chipsi", "alpha.bar"))

## S4 method for signature 'ghyp':
coefficients(object, type = c("chipsi", "alpha.bar"))

Arguments

object An object inheriting from class ghyp.
type According to type the parameters of either the “chi/psi” or the “alpha.bar” parametrization will be returned.

Value

If type is “chipsi” a list with components:
lambda Shape parameter.
chi Shape parameter.
psi Shape parameters.
mu Location parameter.
sigma Dispersion parameter.
gamma Skewness parameter.

If type is “alpha.bar” a list with components:
lambda Shape parameter.
alpha.bar Shape parameter.
mu Location parameter.
sigma Dispersion parameter.
gamma Skewness parameter.

Author(s)

David Lüthi

See Also

fit.ghypuv, fit.ghypmv, ghyp.fit.info, transform, [.ghyp

Examples

  ghyp.mv <- ghyp(lambda=1, alpha.bar=0.1, mu=rep(0,2), sigma=diag(rep(1,2)), 
                  gamma=rep(0,2),data=matrix(rt(1000,df=4),ncol=2))
  ## Get parameters
  coef(ghyp.mv, type = "alpha.bar")
  coefficients(ghyp.mv, type = "chipsi") 
  
  ## Simple modification (do not modify slots directly e.g. object@mu <- 0:1)
  param <- coef(ghyp.mv, type = "alpha.bar")
  param$mu <- 0:1
  do.call("ghyp", param) # returns a new 'ghyp' object
  
  

[Package ghyp version 1.0.0 Index]