Skip to content

Commit

Permalink
Fixed broken tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Avi-Kenny committed Feb 16, 2024
1 parent dd87bae commit 9ff4b66
Showing 1 changed file with 10 additions and 13 deletions.
23 changes: 10 additions & 13 deletions tests/testthat/test-test-core-functions.R
Original file line number Diff line number Diff line change
Expand Up @@ -234,26 +234,23 @@ test_that("est_np (CR)", {
expect_equal(ests_np$cr$s[50], 1.15447, tolerance=0.01)
expect_equal(ests_np$cr$est[1], 0.2692285, tolerance=0.01)
expect_equal(ests_np$cr$est[50], 0.08646103, tolerance=0.01)
# expect_equal(ests_np$cr$se[1], 999, tolerance=0.01)
# expect_equal(ests_np$cr$se[50], 999, tolerance=0.01)
# expect_equal(ests_np$cr$se[101], 999, tolerance=0.01)
expect_equal(ests_np$cr$ci_lower[1], 0.161259, tolerance=0.01)
expect_equal(ests_np$cr$ci_lower[50], 0.06596329, tolerance=0.01)
expect_equal(ests_np$cr$ci_upper[1], 0.4155087, tolerance=0.01)
expect_equal(ests_np$cr$ci_upper[50], 0.1151884, tolerance=0.01)
expect_equal(ests_np$cr$ci_lower[1], 0.1541638, tolerance=0.01)
expect_equal(ests_np$cr$ci_lower[50], 0.06357959, tolerance=0.01)
expect_equal(ests_np$cr$ci_upper[1], 0.4286726, tolerance=0.01)
expect_equal(ests_np$cr$ci_upper[50], 0.119551, tolerance=0.01)
})

test_that("est_np (CVE)", {
expect_equal(ests_np$cve$s[1], 0, tolerance=0.01)
expect_equal(ests_np$cve$s[50], 1.15447, tolerance=0.01)
expect_equal(ests_np$cve$est[1], -8.348665, tolerance=0.01)
expect_equal(ests_np$cve$est[50], -2.002264, tolerance=0.01)
expect_equal(ests_np$cve$se[1], 3.161112, tolerance=0.01)
expect_equal(ests_np$cve$se[50], 0.8215806, tolerance=0.01)
expect_equal(ests_np$cve$ci_lower[1], -17.13744, tolerance=0.01)
expect_equal(ests_np$cve$ci_lower[50], -4.133193, tolerance=0.01)
expect_equal(ests_np$cve$ci_upper[1], -3.837045, tolerance=0.01)
expect_equal(ests_np$cve$ci_upper[50], -0.7789708, tolerance=0.01)
expect_equal(ests_np$cve$se[1], 3.305265, tolerance=0.01)
expect_equal(ests_np$cve$se[50], 0.8562881, tolerance=0.01)
expect_equal(ests_np$cve$ci_lower[1], -17.69397, tolerance=0.01)
expect_equal(ests_np$cve$ci_lower[50], -4.250831, tolerance=0.01)
expect_equal(ests_np$cve$ci_upper[1], -3.695139, tolerance=0.01)
expect_equal(ests_np$cve$ci_upper[50], -0.7437654, tolerance=0.01)
})

p <- plot_ce(ests_np)
Expand Down

0 comments on commit 9ff4b66

Please sign in to comment.