regressionTests/testghypMeanVarMode.R

detach("package:GeneralizedHyperbolic")
detach("package:HyperbolicDist")
library(GeneralizedHyperbolic)
gParam <- c(0, 1, 3, 1, 0.5)
hParam <- c(0.5, 3, 1, 1, 0)
gmResult <- ghypMean(param = gParam)
gvResult <- ghypVar(param = gParam)
gsResult <- ghypSkew(param = gParam)
gkResult <- ghypKurt(param = gParam)
gmoResult <- ghypMode(param = gParam)
detach("package:GeneralizedHyperbolic")
library(HyperbolicDist)
hmResult <- ghypMean(Theta = hParam)
hvResult <- ghypVar(Theta = hParam)
hsResult <- ghypSkew(Theta = hParam)
hkResult <- ghypKurt(Theta = hParam)
hmoResult <- ghypMode(Theta = hParam)
detach("package:HyperbolicDist")

checkEqual(gmResult, hmResult, "ghypMean")
checkEqual(gvResult, hvResult, "ghypVar")
checkEqual(gsResult, hsResult, "ghypSkew")
checkEqual(gkResult, hkResult, "ghypKurt")
checkEqual(gmoResult, hmoResult, "ghypMode")
sjp/GeneralizedHyperbolic documentation built on May 26, 2017, 10:13 a.m.