Skip to content

Commit

Permalink
suppress Warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
strengejacke committed Oct 2, 2023
1 parent cd81f07 commit fe912b6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions tests/testthat/test-bayesfactor_models.R
Original file line number Diff line number Diff line change
Expand Up @@ -141,12 +141,12 @@ test_that("bayesfactor_models BRMS", {
))

set.seed(444)
suppressMessages(
suppressWarnings(suppressMessages(
expect_message(
bfm <- bayesfactor_models(stan_brms_model_0, stan_brms_model_1),
regexp = "marginal"
)
)
))

set.seed(444)
stan_brms_model_0wc <- brms::add_criterion(
Expand All @@ -163,7 +163,7 @@ test_that("bayesfactor_models BRMS", {
silent = 2
)

expect_message(bfmwc <- bayesfactor_models(stan_brms_model_0wc, stan_brms_model_1wc), regexp = NA)
suppressWarnings(expect_message(bfmwc <- bayesfactor_models(stan_brms_model_0wc, stan_brms_model_1wc), regexp = NA))
expect_equal(bfmwc$log_BF, bfm$log_BF, tolerance = 0.01)
})

Expand Down
6 changes: 3 additions & 3 deletions tests/testthat/test-bayesfactor_parameters.R
Original file line number Diff line number Diff line change
Expand Up @@ -104,12 +104,12 @@ test_that("bayesfactor_parameters BRMS", {

set.seed(222)
brms_mixed_6_p <- unupdate(brms_mixed_6)
bfsd1 <- bayesfactor_parameters(brms_mixed_6, brms_mixed_6_p, effects = "fixed")
bfsd1 <- suppressWarnings(bayesfactor_parameters(brms_mixed_6, brms_mixed_6_p, effects = "fixed"))

set.seed(222)
bfsd2 <- bayesfactor_parameters(brms_mixed_6, effects = "fixed")
bfsd2 <- suppressWarnings(bayesfactor_parameters(brms_mixed_6, effects = "fixed"))

expect_equal(log(bfsd1$BF), log(bfsd2$BF), tolerance = .11)
expect_equal(log(bfsd1$BF), log(bfsd2$BF), tolerance = 0.11)


brms_mixed_1 <- insight::download_model("brms_mixed_1")
Expand Down

0 comments on commit fe912b6

Please sign in to comment.