Running 'testbesselRatio.R' [0s]
  Running 'testghypMeanVarMode.R' [155s]
  Running 'testghypMom.R' [0s]
  Running 'testgigCheckPars.R' [167s]
  Running 'testgigMeanVarMode.R' [168s]
  Running 'testgigMom.R' [0s]
  Running 'testis.wholenumber.R' [172s]
  Running 'testmomChangeAbout.R' [164s]
  Running 'testmomIntegrated.R' [160s]
Running the tests in 'tests/testghypMeanVarMode.R' failed.
Complete output:
  > library(HyperbolicDist)
  > if (FALSE){
  +   fileList <- list.files("../R/")
  +   fileList <- fileList[-grep(".+~",fileList)]
  +   fileNames <- paste("../R/", fileList, sep = "")
  +   lapply(fileNames,source)
  + }
  > sampSize <- 100000
  > Theta <- c(2,2,1,2,1)
  > mu <- Theta[5]
  > dataVector <- rghyp(sampSize, Theta)
  > ### Test ghypMean
  > (m1 <- ghypMean(Theta))
  [1] 3.125532
  > momIntegrated("ghyp", order = 1, param = Theta, about = 0)
  [1] 3.125532
  > 
  > ### Test ghypVar
  > ghypVar(Theta)
  [1] 3.192044
  > ghypMom(2, Theta, momType = "central")
  [1] 3.192044
  > momIntegrated("ghyp", order = 2, param = Theta, about = m1)
  [1] 3.192044
  > var(dataVector)
  [1] 3.20737
  > 
  > ### Test ghypSkew
  > ghypSkew(Theta)
  [1] 0.7928604
  > skewness(dataVector)
  [1] 0.8005944
  > 
  > ### Test ghypKurt
  > ghypKurt(Theta)
  [1] 1.343511
  > kurtosis(dataVector)
  [1] 1.398665
  > 
  > 
  > 
  > proc.time()
     user  system elapsed 
     0.81    0.06    0.86 
Running the tests in 'tests/testgigCheckPars.R' failed.
Complete output:
  > library(HyperbolicDist)
  > 
  > ### Test gigCheckPars
  > Theta <- c(-0.5,5,2.5)
  > gigCheckPars(Theta)
  $case
  [1] "normal"
  
  $errMessage
  [1] ""
  
  > gigCheckPars(c(0.5,-5,2.5))
  $case
  [1] "error"
  
  $errMessage
  [1] "chi must be non-negative"
  
  > gigCheckPars(c(0.5,5,-2.5))
  $case
  [1] "error"
  
  $errMessage
  [1] "psi must be non-negative"
  
  > gigCheckPars(c(0.5,-5,-2.5))
  $case
  [1] "error"
  
  $errMessage
  [1] "chi must be non-negative"
  
  > gigCheckPars(c(0.5,0,2.5))
  $case
  [1] "gamma"
  
  $errMessage
  [1] ""
  
  > gigCheckPars(c(-0.5,0,2.5))
  $case
  [1] "error"
  
  $errMessage
  [1] "lambda must be positive when chi = 0"
  
  > gigCheckPars(c(0.5,0,0))
  $case
  [1] "error"
  
  $errMessage
  [1] "psi and chi cannot both be 0"
  
  > gigCheckPars(c(-0.5,0,0))
  $case
  [1] "error"
  
  $errMessage
  [1] "lambda must be positive when chi = 0"
  
  > gigCheckPars(c(0.5,5,0))
  $case
  [1] "error"
  
  $errMessage
  [1] "lambda must be negative when psi = 0"
  
  > gigCheckPars(c(-0.5,5,0))
  $case
  [1] "invgamma"
  
  $errMessage
  [1] ""
  
  > 
  > proc.time()
     user  system elapsed 
     0.17    0.07    0.23 
Running the tests in 'tests/testgigMeanVarMode.R' failed.
Complete output:
  > 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.413523
  > 
  > ### 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.5629055
  > 
  > ### Test gigSkew
  > gigSkew(Theta)
  [1] 1.595489
  > skewness(dataVector)
  [1] 1.626348
  > 
  > ### Test gigKurt
  > gigKurt(Theta)
  [1] 4.242641
  > kurtosis(dataVector)
  [1] 4.732008
  > 
  > 
  > 
  > proc.time()
     user  system elapsed 
     0.73    0.07    0.79 
Running the tests in 'tests/testis.wholenumber.R' failed.
Complete output:
  > ### Test is.wholenumber
  > library(HyperbolicDist)
  > 
  > is.wholenumber(-3:5)
  [1] TRUE
  > is.wholenumber(c(0,0.1,1.3,5))
  [1] FALSE
  > is.wholenumber(-3:5 + .Machine$double.eps)
  [1] TRUE
  > is.wholenumber(-3:5 + .Machine$double.eps^0.5)
  [1] FALSE
  > is.wholenumber(c(2L,3L))
  [1] TRUE
  > is.wholenumber(c("2L","3L"))
  [1] FALSE
  > is.wholenumber(0i ^ (-3:3))
  [1] FALSE
  > is.wholenumber(matrix(1:6, nrow = 3))
  [1] TRUE
  > is.wholenumber(list(-1:3,2:6))
  [1] FALSE
  > is.numeric(list(-1:3,2:6))
  [1] FALSE
  > is.wholenumber(unlist(list(-1:3,2:6)))
  [1] TRUE
  > 
  > proc.time()
     user  system elapsed 
     0.18    0.06    0.23 
Running the tests in 'tests/testmomChangeAbout.R' failed.
Complete output:
  > library(HyperbolicDist)
  > 
  > ### Gamma distribution
  > k <- 4
  > shape <- 2
  > old <- 0
  > new <- 1
  > sampSize <- 1000000
  > 
  > ### Calculate 1st to 4th raw moments
  > m <- numeric(k)
  > for (i in 1:k){
  +    m[i] <- gamma(shape + i)/gamma(shape)
  + }
  > m
  [1]   2   6  24 120
  > 
  > ### Calculate 4th moment about new
  > momChangeAbout(k, m, old, new)
  [1] 53
  > ### Calculate 3rd about new
  > momChangeAbout(3, m, old, new)
  [1] 11
  > 
  > ### Calculate 1st to 4th moments about new
  > momChangeAbout(oldMom = m, oldAbout = old, newAbout = new)
  [1]  1  3 11 53
  > momChangeAbout(order = "all", m, old, new)
  [1]  1  3 11 53
  > 
  > ### Approximate kth moment about new using sampling
  > x <- rgamma(sampSize, shape)
  > mean((x - new)^k)
  [1] 52.37685
  > 
  > 
  > proc.time()
     user  system elapsed 
     0.50    0.04    0.53 
Running the tests in 'tests/testmomIntegrated.R' failed.
Complete output:
  > library(HyperbolicDist)
  > testVG <- FALSE
  > 
  > ### Test ghyp
  > m1 <- momIntegrated("ghyp", order = 1, param = c(1/2,3,1,1,0), about = 0)
  > m1
  [1] 0.4785534
  > ghypMean(c(1/2,3,1,1,0))
  [1] 0.4785534
  > momIntegrated("ghyp", order = 1, param = c(1/2,3,1,1,0), about = m1)
  [1] -1.387779e-17
  > m2 <- momIntegrated("ghyp", order = 2, param = c(1/2,3,1,1,0), about = 0)
  > m2
  [1] 0.7830109
  > m2 - m1^2
  [1] 0.5539976
  > momIntegrated("ghyp", order = 2, param = c(1/2,3,1,1,0), about = m1)
  [1] 0.5539976
  > momIntegrated("generalized hyperbolic", order = 2, param = c(1/2,3,1,1,0),
  +               about = m1)
  [1] 0.5539976
  > ghypVar(c(1/2,3,1,1,0))
  [1] 0.5539976
  > 
  > 
  > ### Test hyperb
  > m1 <- momIntegrated("hyperb", order = 1, param = c(2,1,1,0), about = 0)
  > m1
  [1] 5.398968
  > hyperbMean(c(2,1,1,0))
  [1] 5.398968
  > momIntegrated("hyperb", order = 1, param = c(2,1,1,0), about = m1)
  [1] -3.932415e-15
  > m2 <- momIntegrated("hyperb", order = 2, param = c(2,1,1,0), about = 0)
  > m2
  [1] 49.89123
  > m2 - m1^2
  [1] 20.74237
  > momIntegrated("hyperb", order = 2, param = c(2,1,1,0), about = m1)
  [1] 20.74237
  > momIntegrated("hyperbolic", order = 2, param = c(2,1,1,0),
  +               about = m1)
  [1] 20.74237
  > hyperbVar(c(2,1,1,0))
  [1] 20.74237
  > 
  > ### Test gig
  > m1 <- momIntegrated("gig", order = 1, param = c(1,2,3), about = 0)
  > m1
  [1] 1.353536
  > gigMean(c(1,2,3))
  [1] 1.353536
  > gigRawMom(1, c(1,2,3))
  [1] 1.353536
  > momIntegrated("gig", order = 1, param = c(1,2,3), about = m1)
  [1] -6.471603e-16
  > 
  > m2 <- momIntegrated("gig", order = 2, param = c(1,2,3), about = 0)
  > m2
  [1] 2.471381
  > m2 - m1^2
  [1] 0.6393221
  > momIntegrated("gig", order = 2, param = c(1,2,3), about = m1)
  [1] 0.6393221
  > momIntegrated("generalized inverse Gaussian", order = 2, param = c(1,2,3),
  +               about = m1)
  [1] 0.6393221
  > gigVar(c(1,2,3))
  [1] 0.6393221
  > gigMom(2, c(1,2,3), about = m1)
  [1] 0.6393221
  > 
  > ### Test gamma
  > m1 <- momIntegrated("gamma", order = 1, param = c(2,3), about = 0)
  > m1
  [1] 0.6666667
  > shape <- 2
  > rate <- 3
  > gigMom(1, c(shape, 0, 2*rate))
  [1] 0.6666667
  > momIntegrated("gamma", order = 1, param = c(2,3), about = m1)
  [1] -4.510281e-17
  > m2 <- momIntegrated("gamma", order = 2, param = c(2,3), about = 0)
  > m2
  [1] 0.6666667
  > m2 - m1^2
  [1] 0.2222222
  > momIntegrated("gamma", order = 2, param = c(2,3), about = m1)
  [1] 0.2222222
  > gigMom(2, c(shape, 0, 2*rate), about = m1)
  [1] 0.2222222
  > 
  > ### Test inverse gamma
  > m1 <- momIntegrated("invgamma", order = 1, param = c(3,4), about = 0)
  > m1
  [1] 0.125
  > shape <- 3
  > rate <- 1/4
  > gigMom(order = -1, c(shape, 0, 2*rate))
  [1] 0.125
  > momIntegrated("invgamma", order = 1, param = c(3,4), about = m1)
  [1] -5.809155e-16
  > m2 <- momIntegrated("invgamma", order = 2, param = c(3,4), about = 0)
  > m2
  [1] 0.03125
  > gigMom(order = -2, c(shape, 0, 2*rate))
  [1] 0.03125
  > m2 - m1^2
  [1] 0.015625
  > momIntegrated("invgamma", order = 2, param = c(3,4), about = m1)
  [1] 0.015625
  > 
  > 
  > proc.time()
     user  system elapsed 
     0.12    0.14    0.25