ghyp-mle.ghyp-classes {ghyp}R Documentation

Classes ghyp and mle.ghyp

Description

The class “ghyp” basically contains the parameters of a generalized hyperbolic distribution. The class “mle.ghyp” inherits from the class “ghyp”. The class “mle.ghyp” adds some additional slots which contains information about the fitting procedure. Namely the number of iterations n.iter, the log likelihood value llh, the Akaike Information Criterion aic, a boolean vector fitted.params stating which parameters were fitted, a boolean converged whether the fitting procedure converged or not, an error.code which stores the status of a possible error and the corresponding error.message. In the univariate case the parameter variance is also stored in parameter.variance.

Objects from the Class

Objects should only be created by calls to the constructors ghyp, hyp, NIG, VG and student.t or by calls to the fitting routines like fit.ghypuv, fit.ghypmv, fit.hypuv, fit.hypmv et cetera.

Slots

Slots of class ghyp:

call:
The function-call of class "call".
lambda:
Shape parameter of class "numeric".
alpha.bar:
Shape parameter of class "numeric".
chi:
Shape parameter of an alternative parametrization. Object of class "numeric".
psi:
Shape parameter of an alternative parametrization. Object of class "numeric".
mu:
Location parameter of lass "numeric".
sigma:
Dispersion parameter of class "numeric" in the univariate case and "matrix" in the multivariate case.
gamma:
Skewness parameter of class "numeric".
model:
Model, i.e., (a)symmetric generalized hyperbolic distribution or (a)symmetric special case. Object of class "character".
dimension:
Dimension of the generalized hyperbolic distribution. Object of class "numeric".
expected.value:
The expected value of a generalized hyperbolic distribution. Object of class "numeric".
variance:
The variance of a generalized hyperbolic distribution. Either of class "numeric" in the univariate case and "matrix" in the multivariate case.
data:
The data-slot is of class "matrix" for multivariate distributions and of class "numeric" for univariate distributions. When an object of class ghypmv is instantiated the user can decide whether data should be stored within the object or not. This is the default and may be useful when fitting eneralized hyperbolic distributions to data and perform further analysis afterwards.
parametrization:
Parametrization of the generalized hyperbolic distribution of class "character". These are currently either "lambda.chi.psi" or "lambda.alpha.bar".

Slots added by class mle.ghyp:

n.iter:
The number of iterations of class "numeric".
llh:
The log likelihood value of class "numeric".
converged:
A boolean whether converged or not. Object of class "logical".
error.code:
An error code of class "numeric".
error.message:
An error message of class "character".
fitted.params:
A boolean vector stating which parameters were fitted of class "logical".
aic:
The value of the Akaike Information Criterion of class "numeric".
parameter.variance:
The parameter variance is calculated to be the inverse of the fisher information matrix. This slot is filled only in the case of an univariate fit. Parameter.variance is of class "matrix".

Extends

Class “mle.ghyp” extends class "ghyp", directly.

Methods

A “pairs” method (see pairs).
A “hist” method (see hist).
A “plot” method (see plot).
A “lines” method (see lines).
A “coef” method (see coef).
A “mean” method (see mean).
A “vcov” method (see vcov).
A “transform” method (see transform).
A “[.ghyp” method (see [).
A “logLik” method for objects of class “mle.ghyp” (see logLik).
An “AIC” method for objects of class “mle.ghyp” (see AIC).
A “summary” method for objects of class “mle.ghyp” (see summary).

Note

When showing special cases of the generalized hyperbolic distribution the corresponding fixed parameters are not printed.

Author(s)

David Lüthi

See Also

optim for an interpretation of error.code and error.message.
ghyp, hyp, NIG, VG, student.t for constructors of the class ghyp. fit.ghypuv, fit.ghypmv et cetera for the fitting routies and constructors of the class mle.ghyp.

Examples

  data(smi.stocks)
  multivariate.fit <- fit.ghypmv(data = smi.stocks, 
                                 opt.pars = c(lambda = FALSE, alpha.bar = FALSE), 
                                 lambda=2)
  summary(multivariate.fit)
  
  vcov(multivariate.fit)
  mean(multivariate.fit)
  logLik(multivariate.fit)
  AIC(multivariate.fit)
  coef(multivariate.fit)

  univariate.fit <- multivariate.fit[1]
  hist(univariate.fit)
  
  plot(univariate.fit)
  lines(multivariate.fit[2])
  
  

[Package ghyp version 1.0.0 Index]