logLik-AIC-methods | R Documentation |
The functions logLik
and AIC
extract the Log-Likelihood
and the Akaike's Information Criterion from fitted generalized
hyperbolic distribution objects. The Akaike information criterion is
calculated according to the formula -2 \cdot
\mbox{log-likelihood} + k \cdot n_{par}
, where n_{par}
represents the number of parameters
in the fitted model, and k = 2
for the usual AIC.
## S4 method for signature 'mle.ghyp'
logLik(object, ...)
## S4 method for signature 'mle.ghyp'
AIC(object, ..., k = 2)
object |
An object of class |
k |
The “penalty” per parameter to be used; the default k = 2 is the classical AIC. |
... |
An arbitrary number of objects of class |
Either the Log-Likelihood or the Akaike's Information Criterion.
The Log-Likelihood as well as the Akaike's Information Criterion can be obtained from
the function ghyp.fit.info
. However, the benefit of logLik
and AIC
is that these functions allow a call with an arbitrary number of objects and are better known
because they are generic.
David Luethi
fit.ghypuv
, fit.ghypmv
, lik.ratio.test
,
ghyp.fit.info
, mle.ghyp-class
data(smi.stocks)
## Multivariate fit
fit.mv <- fit.hypmv(smi.stocks, nit = 10)
AIC(fit.mv)
logLik(fit.mv)
## Univariate fit
fit.uv <- fit.tuv(smi.stocks[, "CS"], control = list(maxit = 10))
AIC(fit.uv)
logLik(fit.uv)
# Both together
AIC(fit.uv, fit.mv)
logLik(fit.uv, fit.mv)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.