Learn R Programming

ghyp (version 1.1.0)

ghyp-mle.ghyp-classes: 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.

Arguments

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.

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).

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

Run this code
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])

Run the code above in your browser using DataLab