https://github.com/cran/bayestestR
Revision d8462ad2168ad7ee61c0d7e679174e775f01a9be authored by Dominique Makowski on 18 January 2020, 07:10:02 UTC, committed by cran-robot on 18 January 2020, 07:10:02 UTC
1 parent 4936034
Raw File
Tip revision: d8462ad2168ad7ee61c0d7e679174e775f01a9be authored by Dominique Makowski on 18 January 2020, 07:10:02 UTC
version 0.5.0
Tip revision: d8462ad
test-point_estimate.R
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
    )
  })
}
back to top