From 3b5bb80bcfe09312b153700d0bc3b1a44cc689e8 Mon Sep 17 00:00:00 2001 From: Daniel Date: Fri, 30 Jun 2023 22:28:01 +0200 Subject: [PATCH] examples --- R/estimate_density.R | 6 ++++-- man/estimate_density.Rd | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/R/estimate_density.R b/R/estimate_density.R index db6786472..d7c1a5a6f 100644 --- a/R/estimate_density.R +++ b/R/estimate_density.R @@ -76,11 +76,13 @@ #' # rstanarm models #' # ----------------------------------------------- #' library(rstanarm) -#' model <- stan_glm(mpg ~ wt + gear, data = mtcars, chains = 2, iter = 200, refresh = 0) +#' model <- suppressWarning( +#' stan_glm(mpg ~ wt + gear, data = mtcars, chains = 2, iter = 200, refresh = 0) +#' ) #' head(estimate_density(model)) #' #' library(emmeans) -#' head(estimate_density(emtrends(model, ~1, "wt"))) +#' head(estimate_density(emtrends(model, ~1, "wt", data = mtcars))) #' #' # brms models #' # ----------------------------------------------- diff --git a/man/estimate_density.Rd b/man/estimate_density.Rd index 02aad8b32..4aad26d7a 100644 --- a/man/estimate_density.Rd +++ b/man/estimate_density.Rd @@ -115,11 +115,13 @@ head(estimate_density(iris$Petal.Width, at = iris$Species)) # rstanarm models # ----------------------------------------------- library(rstanarm) -model <- stan_glm(mpg ~ wt + gear, data = mtcars, chains = 2, iter = 200, refresh = 0) +model <- suppressWarning( + stan_glm(mpg ~ wt + gear, data = mtcars, chains = 2, iter = 200, refresh = 0) +) head(estimate_density(model)) library(emmeans) -head(estimate_density(emtrends(model, ~1, "wt"))) +head(estimate_density(emtrends(model, ~1, "wt", data = mtcars))) # brms models # -----------------------------------------------