Skip to content

Commit

Permalink
improve 'brmsfit_multiple' warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
paul-buerkner committed Sep 2, 2019
1 parent dd947a5 commit 330ef74
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions R/brm_multiple.R
Original file line number Diff line number Diff line change
Expand Up @@ -268,8 +268,8 @@ is_data_list <- function(x) {
is.list(x) && is.vector(x)
}

warn_brmsfit_multiple <- function(x) {
if (is.brmsfit_multiple(x)) {
warn_brmsfit_multiple <- function(x, newdata = NULL) {
if (is.brmsfit_multiple(x) && is.null(newdata)) {
warning2(
"Using only the first imputed data set. Please interpret the results ",
"with caution until a more principled approach has been implemented."
Expand Down
2 changes: 1 addition & 1 deletion R/extract_draws.R
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ extract_draws.brmsfit <- function(x, newdata = NULL, re_formula = NULL,
new_objects = list(), ...) {
snl_options <- c("uncertainty", "gaussian", "old_levels")
sample_new_levels <- match.arg(sample_new_levels, snl_options)
warn_brmsfit_multiple(x)
warn_brmsfit_multiple(x, newdata = newdata)
x <- restructure(x)
if (!incl_autocor) {
x <- remove_autocor(x)
Expand Down

0 comments on commit 330ef74

Please sign in to comment.