Expected value and variance {ghyp}R Documentation

Expected value and variance-covariance of generalized hyperbolic distributions

Description

The function mean returns the expected value. The function vcov returns the variance in the univariate case and the variance covariance matrix in the multivariate case.

Usage

## S4 method for signature 'ghypbase':
mean(x)
## S4 method for signature 'ghypbase':
vcov(object)

Arguments

x, object An object inheriting from class ghypbase.

Value

Either the expected value or the variance.

Author(s)

David Lüthi

See Also

ghyp, ghypbase-class, ghyp.moments

Examples

  ## Univariate: Parametric 
  vg.dist <- VG(lambda=1.10,mu=10,sigma=10,gamma=2)
  mean(vg.dist)
  vcov(vg.dist)
  ## Univariate: Empirical                                                 
  vg.sim <- rghyp(10000,vg.dist)
  mean(vg.sim)
  var(vg.sim)

  ## Multivariate: Parametric 
  vg.dist <- VG(lambda=.10,mu=c(55,33),sigma=diag(c(22,888)),gamma=1:2)
  mean(vg.dist)
  vcov(vg.dist)
  ## Multivariate: Empirical                                                 
  vg.sim <- rghyp(10000,vg.dist)
  colMeans(vg.sim)
  var(vg.sim)  

[Package ghyp version 0.9.2 Index]