https://github.com/cran/bayestestR
Tip revision: 2565fc870cd7f0a64d857ff89e682dc9344dc7c1 authored by Dominique Makowski on 12 February 2020, 04:10:16 UTC
version 0.5.2
version 0.5.2
Tip revision: 2565fc8
test-point_estimate.R
if (requireNamespace("rstanarm", quietly = TRUE)) {
context("point_estimate")
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
)
})
}
}