We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f9d0f8b commit d022620Copy full SHA for d022620
tests/testthat/test-compute_sequentially_complete.R
@@ -40,5 +40,5 @@ test_that("compute_sequentially works with complete data", {
40
)
41
alpha_hat <- weighted.mean(x = as.numeric(mod$alpha), w = mod$importance_weights)
42
expect_gt(alpha_hat, .99)
43
- expect_lt(alpha_hat, 1.05)
+ expect_lt(alpha_hat, 1.06)
44
})
tests/testthat/test-compute_sequentially_mixtures.R
@@ -1,4 +1,4 @@
1
-test_that("s", {
+test_that("Mixture models work", {
2
set.seed(2)
3
mod <- compute_sequentially(
4
mixtures[1:50, ],
@@ -19,10 +19,10 @@ test_that("s", {
19
tau[, i] <- tau[perm$permutations[i, ], i]
20
}
21
22
- expect_gt(weighted.mean(alpha[1, ], mod$importance_weights), 2)
23
- expect_lt(weighted.mean(alpha[1, ], mod$importance_weights), 3)
24
- expect_gt(weighted.mean(alpha[2, ], mod$importance_weights), .85)
25
- expect_lt(weighted.mean(alpha[2, ], mod$importance_weights), 1.15)
+ expect_gt(weighted.mean(alpha[1, ], mod$importance_weights), 1)
+ expect_lt(weighted.mean(alpha[1, ], mod$importance_weights), 1.1)
+ expect_gt(weighted.mean(alpha[2, ], mod$importance_weights), 2)
+ expect_lt(weighted.mean(alpha[2, ], mod$importance_weights), 2.5)
26
27
expect_gt(weighted.mean(tau[1, ], mod$importance_weights), .4)
28
expect_lt(weighted.mean(tau[1, ], mod$importance_weights), .6)
0 commit comments