diff --git a/tests/testthat/test-rmse.R b/tests/testthat/test-rmse.R index 8628760ad..e19bd49b3 100644 --- a/tests/testthat/test-rmse.R +++ b/tests/testthat/test-rmse.R @@ -28,6 +28,16 @@ test_that("rmse, ci", { # bootstrapped set.seed(123) out <- performance_rmse(model, ci = 0.95, ci_method = "boot") - expect_equal(out$CI_low, 1.9494, tolerance = 1e-4) - expect_equal(out$CI_high, 3.38406, tolerance = 1e-4) + expect_equal(out$CI_low, 1.9494, tolerance = 1e-3) + expect_equal(out$CI_high, 3.38406, tolerance = 1e-3) + + # bootstrapped, mixed models + skip_on_cran() + skip_if_not_installed("lme4") + data(sleepstudy, package = "lme4") + m <- lme4::lmer(Reaction ~ Days + (1 | Subject), data = sleepstudy) + set.seed(123) + out <- performance_rmse(m, ci = 0.95, iterations = 100) + expect_equal(out$CI_low, 26.26066, tolerance = 1e-3) + expect_equal(out$CI_high, 32.5642, tolerance = 1e-3) })