ghyp object data {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.fit.info(object) ghyp.data(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.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
.
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
.
David Lüthi
mean
, vcov
,
logLik
, AIC
,
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 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)