R Under development (unstable) (2023-11-25 r85635 ucrt) -- "Unsuffered Consequences" Copyright (C) 2023 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > library(HyperbolicDist) > if (FALSE){ + fileList <- list.files("../R/") + fileList <- fileList[-grep(".+~",fileList)] + fileNames <- paste("../R/", fileList, sep = "") + lapply(fileNames,source) + } > sampSize <- 100000 > Theta <- c(-0.5,5,2.5) > dataVector <- rgig(sampSize, Theta) > ### Test gigMean > (m1 <- gigMean(Theta)) [1] 1.414214 > momIntegrated("gig", order = 1, param = Theta, about = 0) [1] 1.414214 > mean(dataVector) [1] 1.416773 > > ### Test gigVar > gigVar(Theta) [1] 0.5656854 > gigMom(2, Theta, about = m1) [1] 0.5656854 > momIntegrated("gig", order = 2, param = Theta, about = m1) [1] 0.5656854 > var(dataVector) [1] 0.5731289 > > ### Test gigSkew > gigSkew(Theta) [1] 1.595489 > skewness(dataVector) [1] 1.636517 > > ### Test gigKurt > gigKurt(Theta) [1] 4.242641 > kurtosis(dataVector) [1] 4.552623 > > > > proc.time() user system elapsed 0.53 0.03 0.54