| ghyp get methods {ghyp} | R Documentation |
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.
ghyp.params(object, type = c("chipsi", "alpha.bar"))
ghyp.moments(object)
ghyp.data(object)
ghyp.fit.info(object)
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. |
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.moments reutrns a list with components:
e.ghyp | Expected value of a generalized hyperbolic distribution. |
var.ghyp | Variance of a generalized hyperbolic distribution. |
e.gig | Expected value of the corresponding generalized inverse gaussian distribution. |
var.gig | Variance of the corresponding generalized inverse gaussian distribution. |
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.
e.gig and var.gig have to be interpreted as
the expected value and variance of the gamma or inverse
gamma distribution
when the distribution is a special case of the generalized
hyperbolic distribution.
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 or using ghyp or
via the fitting routines fit.ghypuv or fit.ghypmv.
David Lüthi
mean, vcov,
fit.ghypmv, fit.ghypuv, ghyp, optim
## 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 moments
ghyp.moments(ghyp.mv)
## 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)