Skip to content

Commit

Permalink
pass verbose
Browse files Browse the repository at this point in the history
  • Loading branch information
strengejacke committed May 24, 2024
1 parent a049b99 commit 894626c
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Type: Package
Package: bayestestR
Title: Understand and Describe Bayesian Models and Posterior Distributions
Version: 0.13.2.1
Version: 0.13.2.2
Authors@R:
c(person(given = "Dominique",
family = "Makowski",
Expand Down
2 changes: 1 addition & 1 deletion R/describe_posterior.R
Original file line number Diff line number Diff line change
Expand Up @@ -787,7 +787,7 @@ describe_posterior.emmGrid <- function(posterior,
...) {
if (any(c("all", "bf", "bayesfactor", "bayes_factor") %in% tolower(test)) ||
"si" %in% tolower(ci_method)) {
samps <- .clean_priors_and_posteriors(posterior, bf_prior)
samps <- .clean_priors_and_posteriors(posterior, bf_prior, verbose = verbose)
bf_prior <- samps$prior
posterior_samples <- samps$posterior
} else {
Expand Down
4 changes: 1 addition & 3 deletions R/si.R
Original file line number Diff line number Diff line change
Expand Up @@ -160,9 +160,7 @@ si.blavaan <- si.stanreg
#' @export
si.emmGrid <- function(posterior, prior = NULL,
BF = 1, verbose = TRUE, ...) {
samps <- .clean_priors_and_posteriors(posterior, prior,
verbose = verbose
)
samps <- .clean_priors_and_posteriors(posterior, prior, verbose = verbose)

# Get SIs
out <- si.data.frame(
Expand Down
8 changes: 6 additions & 2 deletions R/utils_bayesfactor.R
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,9 @@

if (is.null(prior)) {
prior <- posterior
insight::format_warning("Prior not specified! Please provide the original model to get meaningful results.")
if (verbose) {
insight::format_warning("Prior not specified! Please provide the original model to get meaningful results.")
}
}


Expand Down Expand Up @@ -129,7 +131,9 @@
verbose = TRUE, ...) {
if (is.null(prior)) {
prior <- posterior
insight::format_warning("Prior not specified! Please provide the original model to get meaningful results.")
if (verbose) {
insight::format_warning("Prior not specified! Please provide the original model to get meaningful results.")
}
}

if (!inherits(prior, "emm_list")) {
Expand Down

0 comments on commit 894626c

Please sign in to comment.