@@ -8,7 +8,7 @@ df2 <- 300
8
8
x = c(100 , 50 )
9
9
10
10
testthat :: test_that(" Truncated normal DF (MC versus QMC) give similar answers" , {
11
- skip_on_cran()
11
+ testthat :: skip_on_cran()
12
12
testthat :: expect_equal(ptmvnorm(x , mu = mu , sigma = sigma , lb = lb , ub = ub , log = FALSE , type = " qmc" ),
13
13
ptmvnorm(x , mu = mu , sigma = sigma , lb = lb , ub = ub , log = FALSE , type = " mc" ),
14
14
tolerance = 1e-4 )
@@ -18,7 +18,7 @@ testthat::test_that("Truncated normal DF (MC versus QMC) give similar answers",
18
18
})
19
19
20
20
testthat :: test_that(" Student with large df gives same answer as normal" , {
21
- skip_on_cran()
21
+ testthat :: skip_on_cran()
22
22
testthat :: expect_equal(ptmvnorm(x , B = 1e6 , sigma = sigma , lb = lb , ub = ub , log = FALSE , type = " qmc" ),
23
23
ptmvt(x , B = 1e6 , sigma = sigma , lb = lb , ub = ub , df = 300 , log = FALSE , type = " qmc" ),
24
24
tolerance = 2e-3 )
@@ -55,7 +55,7 @@ D <- 10
55
55
muV <- 1 : D
56
56
Smat <- diag(0.5 , D ) + matrix (0.5 , D , D )
57
57
testthat :: test_that(" Expectation of (truncated) elliptical distributions" , {
58
- skip_on_cran()
58
+ testthat :: skip_on_cran()
59
59
testthat :: expect_equal(colMeans(rtmvnorm(n = B , sigma = Smat )),
60
60
rep(0 , D ), tolerance = 5 / sqrt(B ))
61
61
testthat :: expect_equal(colMeans(rtmvnorm(n = B , mu = muV , sigma = Smat )),
@@ -72,7 +72,7 @@ testthat::test_that("Expectation of (truncated) elliptical distributions", {
72
72
lb <- rnorm(n = D , mean = 0 , sd = 10 )
73
73
ub <- lb + rgamma(D , shape = 4 , rate = 1 )
74
74
testthat :: test_that(" Bounds of simulated variables" , {
75
- skip_on_cran()
75
+ testthat :: skip_on_cran()
76
76
testthat :: expect_true(isTRUE(all(apply(rtmvnorm(n = 1e4 , lb = lb , ub = ub , mu = muV , 100 * Smat ), 2 , min ) > lb )))
77
77
testthat :: expect_true(isTRUE(all(apply(rtmvnorm(n = 1e4 , lb = lb , ub = ub , mu = muV , 100 * Smat ), 2 , min ) < ub )))
78
78
testthat :: expect_true(isTRUE(all(apply(rtmvt(n = 1e4 , df = 3 , lb = lb , ub = ub , mu = muV , 100 * Smat ), 2 , min ) > lb )))
@@ -107,7 +107,7 @@ testthat::test_that("Untruncated density agrees with that in the mvtnorm package
107
107
d <- 15
108
108
sigma <- 0.5 * (diag(d ) + matrix (1 , d , d ))
109
109
testthat :: test_that(" Known probability" , {
110
- skip_on_cran()
110
+ testthat :: skip_on_cran()
111
111
testthat :: expect_equivalent((d + 1 )* pmvnorm(sigma = sigma , lb = rep(0 , d ), type = " qmc" , B = B ),
112
112
1 , tolerance = 1 / sqrt(B ))
113
113
})
0 commit comments