Revision d2eac42f58e4e0f0d07298e8c2e719ef6a30672d authored by Dominique Makowski on 19 June 2020, 08:00:07 UTC, committed by cran-robot on 19 June 2020, 08:00:07 UTC
1 parent 01482dc
Raw File
test-brms.R
if (require("brms", quietly = TRUE)) {
  test_that("brms", {
    # testthat::skip_on_travis()
    testthat::skip_on_cran()

    set.seed(333)
    model <- insight::download_model("brms_mixed_1")

    testthat::expect_is(hdi(model), "data.frame")
    testthat::expect_is(ci(model), "data.frame")
    testthat::expect_is(rope(model), "data.frame")
    # testthat::expect_true("equivalence_test" %in% class(equivalence_test(model)))
    testthat::expect_is(map_estimate(model), "data.frame")
    testthat::expect_is(p_map(model), "data.frame")
    testthat::expect_is(mhdior(model), "data.frame")
    testthat::expect_is(p_direction(model), "data.frame")

    testthat::expect_equal(colnames(hdi(model)), c("Parameter", "CI", "CI_low", "CI_high", "Effects", "Component"))
    testthat::expect_equal(colnames(hdi(model, effects = "all")), c("Parameter", "CI", "CI_low", "CI_high", "Effects", "Component"))
    # testthat::expect_equal(nrow(equivalence_test(model)), 2)
  })
}
back to top