ghyp-data {ghyp} | R Documentation |
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
.
ghyp.fit.info(object) ghyp.data(object) ghyp.name(object, abbr = FALSE, skew.attr = TRUE)
object |
An object inheriting from class
ghyp . |
abbr |
If TRUE the abbreviation of the ghyp distribution will be returned. |
skew.attr |
If TRUE an attribute will be added to the name of the ghyp distribution stating whether the distribution is symmetric or not. |
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.ghyp.name
returns the name of the ghyp
distribution which can be the name of a special case.
Depending on the arguments abbr
and skew.attr
one of the following is returned.
abbr == FALSE & skew.attr == TRUE | abbr == TRUE & skew.attr == TRUE |
(A)symmetric Generalized Hyperbolic | (A)symm ghyp |
(A)symmetric Hyperbolic | (A)symm hyp |
(A)symmetric Normal Inverse Gaussian | (A)symm NIG |
(A)symmetric Variance Gamma | (A)symm VG |
(A)symmetric Student-t | (A)symm t |
Gaussian | Gauss |
abbr == FALSE & skew.attr == FALSE | abbr == TRUE & skew.attr == FALSE |
Generalized Hyperbolic | ghyp |
Hyperbolic | hyp |
Normal Inverse Gaussian | NIG |
Variance Gamma | VG |
Student-t | t |
Gaussian | Gauss |
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
.
David Lüthi
coef
, mean
, vcov
,
logLik
, AIC
for other accessor functions,
fit.ghypmv
, fit.ghypuv
, ghyp
for constructor functions,
optim
for possible error messages.
## 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) ## Get the name of the ghyp object ghyp.name(ghyp(alpha.bar = 0)) ghyp.name(ghyp(alpha.bar = 0, lambda = -4), abbr = TRUE) ## '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)