From 1fc427c698d13b286d1b6a164be800dd30a86364 Mon Sep 17 00:00:00 2001 From: Daniel Date: Mon, 3 Jul 2023 08:28:10 +0200 Subject: [PATCH] examples --- R/si.R | 12 ++++++------ man/si.Rd | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/R/si.R b/R/si.R index 5b73fd936..dd718352e 100644 --- a/R/si.R +++ b/R/si.R @@ -46,23 +46,23 @@ #' library(bayestestR) #' #' prior <- distribution_normal(1000, mean = 0, sd = 1) -#' posterior <- distribution_normal(1000, mean = .5, sd = .3) +#' posterior <- distribution_normal(1000, mean = 0.5, sd = 0.3) #' -#' si(posterior, prior) +#' si(posterior, prior, verbose = FALSE) #' \dontrun{ #' # rstanarm models #' # --------------- #' library(rstanarm) #' contrasts(sleep$group) <- contr.equalprior_pairs # see vignette #' stan_model <- stan_lmer(extra ~ group + (1 | ID), data = sleep) -#' si(stan_model) -#' si(stan_model, BF = 3) +#' si(stan_model, verbose = FALSE) +#' si(stan_model, BF = 3, verbose = FALSE) #' #' # emmGrid objects #' # --------------- #' library(emmeans) #' group_diff <- pairs(emmeans(stan_model, ~group)) -#' si(group_diff, prior = stan_model) +#' si(group_diff, prior = stan_model, verbose = FALSE) #' #' # brms models #' # ----------- @@ -77,7 +77,7 @@ #' prior = my_custom_priors, #' refresh = 0 #' )) -#' si(brms_model) +#' si(brms_model, verbose = FALSE) #' } #' @references #' Wagenmakers, E., Gronau, Q. F., Dablander, F., & Etz, A. (2018, November 22). diff --git a/man/si.Rd b/man/si.Rd index f19a65b1a..5d2e1f495 100644 --- a/man/si.Rd +++ b/man/si.Rd @@ -157,23 +157,23 @@ It is important to provide the correct \code{prior} for meaningful results. library(bayestestR) prior <- distribution_normal(1000, mean = 0, sd = 1) -posterior <- distribution_normal(1000, mean = .5, sd = .3) +posterior <- distribution_normal(1000, mean = 0.5, sd = 0.3) -si(posterior, prior) +si(posterior, prior, verbose = FALSE) \dontrun{ # rstanarm models # --------------- library(rstanarm) contrasts(sleep$group) <- contr.equalprior_pairs # see vignette stan_model <- stan_lmer(extra ~ group + (1 | ID), data = sleep) -si(stan_model) -si(stan_model, BF = 3) +si(stan_model, verbose = FALSE) +si(stan_model, BF = 3, verbose = FALSE) # emmGrid objects # --------------- library(emmeans) group_diff <- pairs(emmeans(stan_model, ~group)) -si(group_diff, prior = stan_model) +si(group_diff, prior = stan_model, verbose = FALSE) # brms models # ----------- @@ -188,7 +188,7 @@ brms_model <- suppressWarnings(brm(extra ~ group + (1 | ID), prior = my_custom_priors, refresh = 0 )) -si(brms_model) +si(brms_model, verbose = FALSE) } \dontshow{\}) # examplesIf} }