From b658741fe29fcd107e5be0480f9fd0b9a0e30e21 Mon Sep 17 00:00:00 2001 From: Daniel Date: Sun, 2 Jul 2023 18:09:46 +0200 Subject: [PATCH] examples --- R/hdi.R | 14 +++++++------- man/hdi.Rd | 14 +++++++------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/R/hdi.R b/R/hdi.R index 3edb676a0..8563b389b 100644 --- a/R/hdi.R +++ b/R/hdi.R @@ -92,21 +92,21 @@ #' model <- suppressWarnings( #' stan_glm(mpg ~ wt + gear, data = mtcars, chains = 2, iter = 200, refresh = 0) #' ) -#' hdi(model) -#' hdi(model, ci = c(0.80, 0.90, 0.95)) +#' bayestestR::hdi(model) +#' bayestestR::hdi(model, ci = c(0.80, 0.90, 0.95)) #' #' library(emmeans) -#' hdi(emtrends(model, ~1, "wt", data = mtcars)) +#' bayestestR::hdi(emtrends(model, ~1, "wt", data = mtcars)) #' #' library(brms) #' model <- brms::brm(mpg ~ wt + cyl, data = mtcars) -#' hdi(model) -#' hdi(model, ci = c(0.80, 0.90, 0.95)) +#' bayestestR::hdi(model) +#' bayestestR::hdi(model, ci = c(0.80, 0.90, 0.95)) #' #' library(BayesFactor) #' bf <- ttestBF(x = rnorm(100, 1, 1)) -#' hdi(bf) -#' hdi(bf, ci = c(0.80, 0.90, 0.95)) +#' bayestestR::hdi(bf) +#' bayestestR::hdi(bf, ci = c(0.80, 0.90, 0.95)) #' } #' @author Credits go to **ggdistribute** and [**HDInterval**](https://github.com/mikemeredith/HDInterval). #' diff --git a/man/hdi.Rd b/man/hdi.Rd index 9cc686a37..adbca70fb 100644 --- a/man/hdi.Rd +++ b/man/hdi.Rd @@ -139,21 +139,21 @@ library(rstanarm) model <- suppressWarnings( stan_glm(mpg ~ wt + gear, data = mtcars, chains = 2, iter = 200, refresh = 0) ) -hdi(model) -hdi(model, ci = c(0.80, 0.90, 0.95)) +bayestestR::hdi(model) +bayestestR::hdi(model, ci = c(0.80, 0.90, 0.95)) library(emmeans) -hdi(emtrends(model, ~1, "wt", data = mtcars)) +bayestestR::hdi(emtrends(model, ~1, "wt", data = mtcars)) library(brms) model <- brms::brm(mpg ~ wt + cyl, data = mtcars) -hdi(model) -hdi(model, ci = c(0.80, 0.90, 0.95)) +bayestestR::hdi(model) +bayestestR::hdi(model, ci = c(0.80, 0.90, 0.95)) library(BayesFactor) bf <- ttestBF(x = rnorm(100, 1, 1)) -hdi(bf) -hdi(bf, ci = c(0.80, 0.90, 0.95)) +bayestestR::hdi(bf) +bayestestR::hdi(bf, ci = c(0.80, 0.90, 0.95)) } } \references{