aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tests/testthat/test_residuals.R2
-rw-r--r--tests/testthat/test_tests.R4
2 files changed, 3 insertions, 3 deletions
diff --git a/tests/testthat/test_residuals.R b/tests/testthat/test_residuals.R
index 0fe05b4f..275b33b9 100644
--- a/tests/testthat/test_residuals.R
+++ b/tests/testthat/test_residuals.R
@@ -4,5 +4,5 @@ test_that("Residuals are correctly returned", {
f <- fits[["FOMC", "FOCUS_C"]]
expect_equal(residuals(f)[1:3], c(-0.7748906, 2.7090589, -1.9451989))
- expect_equivalent(residuals(f_tc_2, standardized = TRUE)[1:3], c(0.52579103, 0.40714911, 1.66394233))
+ expect_equivalent(residuals(f_tc_2, standardized = TRUE)[1:3], c(0.52579103, 0.40714911, 1.66394233), tolerance = 0.0001)
})
diff --git a/tests/testthat/test_tests.R b/tests/testthat/test_tests.R
index 523edc4a..d8b97815 100644
--- a/tests/testthat/test_tests.R
+++ b/tests/testthat/test_tests.R
@@ -5,7 +5,7 @@ test_that("The likelihood ratio test works", {
expect_error(lrtest(fit_tc_1, f_tc_2), "not been fitted to the same data")
res <- lrtest(fit_nw_1, fit_tc_1)
- expect_equal(res[["2", "Pr(>Chisq)"]], 0.9999998)
+ expect_equal(res[["2", "Pr(>Chisq)"]], 1, tolerance = 1e-5)
})
@@ -23,5 +23,5 @@ test_that("Updating fitted models works", {
test_nw_tc <- lrtest(f_soil_1_nw, f_soil_1_tc)
expect_equivalent(test_nw_tc[["2", "Pr(>Chisq)"]], 2.113e-6)
test_nw_A2 <- lrtest(f_soil_1_nw, f_soil_1_nw_A2)
- expect_equivalent(test_nw_A2[["2", "Pr(>Chisq)"]], 0.9999468)
+ expect_equivalent(test_nw_A2[["2", "Pr(>Chisq)"]], 1, tolerance = 1e-4)
})

Contact - Imprint