ghyp object data {ghyp}R Documentation

Get methods for objects inheriting from class ghypbase

Description

These functions simply return values stored within generalized hyperbolic distribution objects. ghyp.fit.info extract information about the fitting procedure from objects of class mle.ghypuv and mle.ghypmv.

Usage

ghyp.params(object, type = c("chipsi", "alpha.bar"))

ghyp.fit.info(object)

ghyp.data(object)

Arguments

object An object inheriting from class ghypbase.
type The parameters of either the (lambda, alpha.bar, mu, sigma, gamma) or the (lambda, chi, psi, mu, sigma, gamma) parametrization will be returned.

Value

ghyp.params reutrns the parameters of the generalized hyperbolic distribution as a list with components:
lambda Shape parameter.
alpha.bar Shape parameter.
chi/psi Shape parameters.
mu Location parameter.
sigma Dispersion parameter.
gamma Skewness parameter.

ghyp.fit.info returns list with components:
logLikelihood The maximized log-likelihood value.
aic The Akaike information criterion.
fitted.params A boolean vector stating which parameters were fitted.
converged A boolean whether optim converged or not.
n.iter The number of iterations.
error.code Error code from optim.
error.message Error message from optim.
parameter.variance Parameter variance (only for univariate fits).

ghyp.data returns NULL if no data is stored within the object, a vector if the object is of class mle.ghypuv or a matrix if the object is of class mle.ghypmv.

Note

ghyp.fit.info requires an object of class mle.ghypuv or mle.ghypmv. In the univariate case the parameter variance is returned as well. The parameter variance is defined as the inverse of the negative hesse-matrix computed by optim. Note that this makes sense only in the case that the estimates are asymptotically normal distributed.

The class ghypbase contains a data slot. Data can be stored either when initializing an object of class ghypuv or ghypmv by using ghyp or via the fitting routines fit.ghypuv or fit.ghypmv.

Author(s)

David Lüthi

See Also

mean, vcov, logLik, AIC, fit.ghypmv, fit.ghypuv, ghyp, optim

Examples

  ## multivariate generalized hyperbolic distribution
  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
  ghyp.params(ghyp.mv,type="alpha.bar")
  ghyp.params(ghyp.mv,type="chipsi")  

  ## Get data
  ghyp.data(ghyp.mv)

  ## 'ghyp.fit.info' does only work when the object is of class 'mle.ghypuv' 
  ## or 'mle.ghypmv', i.e. is created using 'fit.ghypuv' etc.
  mv.fit <- fit.tmv(data = ghyp.data(ghyp.mv), control=list(abs.tol=1e-3))
  ghyp.fit.info(mv.fit)

[Package ghyp version 0.9.3 Index]