# NOT RUN {
library(bayestestR)
# precision = 1 is used to speed up examples...
mhdior(
  x = rnorm(1000, mean = 1, sd = 1),
  range = c(-0.1, 0.1),
  precision = 1
)
df <- data.frame(replicate(4, rnorm(100)))
mhdior(df, precision = 1)
if (require("rstanarm")) {
  model <- stan_glm(
    mpg ~ wt + gear,
    data = mtcars,
    chains = 2,
    iter = 200,
    refresh = 0
  )
  mhdior(model, precision = 1)
}
if (require("emmeans")) {
  mhdior(emtrends(model, ~1, "wt"))
}
if (require("brms")) {
  model <- brms::brm(mpg ~ wt + cyl, data = mtcars)
  mhdior(model)
}
if (require("BayesFactor")) {
  bf <- ttestBF(x = rnorm(100, 1, 1))
  mhdior(bf)
}
# }
Run the code above in your browser using DataLab