Learn R Programming

MixGHD (version 2.3.7)

dCGHD: Density of a coalesced generalized hyperbolic distribution (MSGHD).

Description

Compute the density of a p dimensional coalesced generalized hyperbolic distribution.

Usage

dCGHD(data,p,mu=rep(0,p),alpha=rep(0,p),sigma=diag(p),lambda=1,omega=1,
  omegav=rep(1,p),lambdav=rep(1,p),wg=0.5,gam=NULL,phi=NULL)

Arguments

data

n x p data set

p

number of variables.

mu

(optional) the p dimensional mean

alpha

(optional) the p dimensional skewness parameter alpha

sigma

(optional) the p x p dimensional scale matrix

lambda

(optional) the 1 dimensional index parameter lambda

omega

(optional) the 1 dimensional concentration parameter omega

omegav

(optional) the p dimensional concentration parameter omega

lambdav

(optional) the p dimensional index parameter lambda

wg

(optional) weight

gam

(optional) the pxp gamma matrix

phi

(optional) the p dimensional vector phi

Value

A n dimensional vector with the density from a coalesced generilzed hyperbolic distribution

Details

The default values are: 0 for the mean and the skweness parameter alpha, diag(p) for sigma, 1 for omega, and 0.5 for lambda.

References

C. Tortora, B.C. Franczak, R.P. Browne, and P.D. McNicholas (2019). A Mixture of Coalesced Generalized Hyperbolic Distributions. Journal of Classification (to appear).

Examples

Run this code
# NOT RUN {


x = seq(-3,3,length.out=30)
y = seq(-3,3,length.out=30)
xyS1 = matrix(0,nrow=length(x),ncol=length(y))
for(i in 1:length(x)){
  for(j in 1:length(y)){
      xy <- matrix(cbind(x[i],y[j]),1,2)	
      xyS1[i,j] =  dCGHD(xy,2) 
      
    }
  }
contour(x=x,y=y,z=xyS1, levels=c(.005,.01,.025,.05, .1,.25), main="CGHD",ylim=c(-3,3), xlim=c(-3,3))


# }

Run the code above in your browser using DataLab