swh:1:snp:2c68a6c5a8af2f06ac2c0225927f25b54fd1f9d0
Raw File
Tip revision: 6313ce21ea98857cf95d996de7978cfd52175e59 authored by Dominique Makowski on 08 April 2021, 04:40:02 UTC
version 0.9.0
Tip revision: 6313ce2
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", {
      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", {
      expect_equal(
        point_estimate(m, effects = "all", component = "all")$Median,
        point_estimate(p)$Median,
        tolerance = 1e-3
      )
    })
  }
}
back to top