regressionTests/testdskewlap.R

detach("package:GeneralizedHyperbolic")
detach("package:HyperbolicDist")
library(GeneralizedHyperbolic)
gParam <- c(2, 1, 1)
hParam <- c(1, 1, 2)
sampleInput <- rskewlap(100, param = gParam)
gdResult <- dskewlap(sampleInput, param = gParam)
gpResult <- pskewlap(seq(-2, 5, 0.2), param = gParam)
gqResult <- qskewlap(seq(0.1, 0.9, 0.1), param = gParam)
detach("package:GeneralizedHyperbolic")
library(HyperbolicDist)
hdResult <- dskewlap(sampleInput, Theta = hParam)
hpResult <- pskewlap(seq(-2, 5, 0.2), Theta = hParam)
hqResult <- qskewlap(seq(0.1, 0.9, 0.1), Theta = hParam)
detach("package:HyperbolicDist")

checkEqual(gdResult, hdResult, "dskewlap")
checkEqual(gpResult, hpResult, "pskewlap")
checkEqual(gqResult, hqResult, "qskewlap")
sjp/GeneralizedHyperbolic documentation built on May 26, 2017, 10:13 a.m.