ghyp-data {ghyp}R Documentation

Get methods for objects inheriting from class ghypbase

Description

These functions simply return data stored within generalized hyperbolic distribution objects, i.e. slots of the classes ghyp and mle.ghyp. ghyp.fit.info extracts information about the fitting procedure from objects of class mle.ghyp.

Usage

ghyp.fit.info(object)

ghyp.data(object)

Arguments

object An object inheriting from class ghyp.

Value

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 it is an univariate generalized hyperbolic distribution and matrix if it is an multivariate generalized hyperbolic distribution.

Note

ghyp.fit.info requires an object of class mle.ghyp. 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 ghyp contains a data slot. Data can be stored either when an object is initialized or via the fitting routines and the argument save.data.

Author(s)

David Lüthi

See Also

coef, mean, vcov, logLik, AIC for other accessor functions, fit.ghypmv, fit.ghypuv, ghyp for constructor functions, optim for possible error messages.

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 data
  ghyp.data(ghyp.mv)

  ## 'ghyp.fit.info' does only work when the object is of class 'mle.ghyp',
  ## i.e. is created by '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 1.0.0 Index]