From 9ff4b66d9d903eee6df4a3de8718c1f2d6286c19 Mon Sep 17 00:00:00 2001 From: Avi Kenny Date: Fri, 16 Feb 2024 13:28:44 -0500 Subject: [PATCH] Fixed broken tests --- tests/testthat/test-test-core-functions.R | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/tests/testthat/test-test-core-functions.R b/tests/testthat/test-test-core-functions.R index 300f4bb..d112f29 100644 --- a/tests/testthat/test-test-core-functions.R +++ b/tests/testthat/test-test-core-functions.R @@ -234,13 +234,10 @@ 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)", { @@ -248,12 +245,12 @@ test_that("est_np (CVE)", { 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)