R Under development (unstable) (2023-11-23 r85618 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. > require(SkewHyperbolic) Loading required package: SkewHyperbolic > ## source("../R/skewhypCalcRange.R") > ## source("../R/dskewhyp.R") > ## source("../data/skewhypParam.R") > > ### Testing the accuracy of skewhypMean > data(skewhypParam) > for (i in 1:nrow(skewhypSmallParam)) { + param <- skewhypSmallParam[i, ] + x <- rskewhyp(1000, param = param) + sampleMean <- mean(x) + distMean <- skewhypMean(param = param) + difference <- abs(sampleMean - distMean) + print(difference) + } mu 1 1.092238 mu 2 0.5824677 mu 3 116.2739 mu 4 33.53013 mu 5 2934.463 mu 6 1563.431 mu 7 486329 mu 8 113465.8 mu 9 0.03166946 mu 10 0.01294402 mu 11 0.1170946 mu 12 0.1654078 mu 13 0.03719922 mu 14 0.0148345 mu 15 0.8612208 mu 16 0.648887 > > proc.time() user system elapsed 0.23 0.01 0.25