Skip to content

Commit

Permalink
try emmeans dev
Browse files Browse the repository at this point in the history
  • Loading branch information
strengejacke committed Jul 2, 2023
1 parent 84fbafd commit 9b8fe34
Show file tree
Hide file tree
Showing 9 changed files with 13 additions and 16 deletions.
1 change: 1 addition & 0 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -125,3 +125,4 @@ Config/Needs/website:
rstudio/bslib,
r-lib/pkgdown,
easystats/easystatstemplate
Remotes: rvlenth/emmeans
4 changes: 1 addition & 3 deletions R/bayesfactor_parameters.R
Original file line number Diff line number Diff line change
Expand Up @@ -132,9 +132,7 @@
#'
#' # emmGrid objects
#' # ---------------
#' group_diff <- suppressWarnings(
#' pairs(emmeans(stan_model, ~group, data = sleep))
#' )
#' group_diff <- pairs(emmeans(stan_model, ~group, data = sleep))
#' bayesfactor_parameters(group_diff, prior = stan_model, verbose = FALSE)
#'
#' # Or
Expand Down
4 changes: 1 addition & 3 deletions R/bayesfactor_restricted.R
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,7 @@
#' contrasts(disgust$condition) <- contr.equalprior_pairs # see vignette
#' fit_model <- rstanarm::stan_glm(score ~ condition, data = disgust, family = gaussian())
#'
#' em_condition <- suppressWarnings(
#' emmeans::emmeans(fit_model, ~condition, data = disgust)
#' )
#' em_condition <- emmeans::emmeans(fit_model, ~condition, data = disgust)
#' hyps <- c("lemon < control & control < sulfur")
#'
#' bayesfactor_restricted(em_condition, prior = fit_model, hypothesis = hyps)
Expand Down
2 changes: 1 addition & 1 deletion R/ci.R
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
#' ci(bf, method = "HDI")
#'
#' @examplesIf require("emmeans", quietly = TRUE) && require("rstanarm", quietly = TRUE)
#' model <- suppressWarnings(emtrends(model, ~1, "wt", data = mtcars))
#' model <- emtrends(model, ~1, "wt", data = mtcars)
#' ci(model, method = "ETI")
#' ci(model, method = "HDI")
#' @export
Expand Down
4 changes: 3 additions & 1 deletion R/rope.R
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,9 @@
#' rope(x = rnorm(1000, 1, 1), ci = c(.90, .95))
#' \dontrun{
#' library(rstanarm)
#' model <- stan_glm(mpg ~ wt + gear, data = mtcars, chains = 2, iter = 200, refresh = 0)
#' model <- suppressWarnings(
#' stan_glm(mpg ~ wt + gear, data = mtcars, chains = 2, iter = 200, refresh = 0)
#' )
#' rope(model)
#' rope(model, ci = c(.90, .95))
#'
Expand Down
4 changes: 1 addition & 3 deletions man/bayesfactor_parameters.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 1 addition & 3 deletions man/bayesfactor_restricted.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/ci.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion man/rope.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 9b8fe34

Please sign in to comment.