https://github.com/cran/bayestestR
Tip revision: d2eac42f58e4e0f0d07298e8c2e719ef6a30672d authored by Dominique Makowski on 19 June 2020, 08:00:07 UTC
version 0.7.0
version 0.7.0
Tip revision: d2eac42
test-point_estimate.R
if (require("rstanarm", quietly = TRUE) && require("brms", quietly = TRUE)) {
if (require("insight")) {
m <- insight::download_model("stanreg_merMod_5")
p <- insight::get_parameters(m, effects = "all")
test_that("point_estimate", {
testthat::expect_equal(
point_estimate(m, effects = "all")$Median,
point_estimate(p)$Median,
tolerance = 1e-3
)
})
m <- insight::download_model("brms_zi_3")
p <- insight::get_parameters(m, effects = "all", component = "all")
test_that("point_estimate", {
testthat::expect_equal(
point_estimate(m, effects = "all", component = "all")$Median,
point_estimate(p)$Median,
tolerance = 1e-3
)
})
}
}