From edecd11fa282b47edb6e96d27f8892b12d6add9c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Paul-Christian=20B=C3=BCrkner?= Date: Wed, 30 Oct 2024 12:55:59 +0100 Subject: [PATCH] allow for non-unique draw_ids in post-processing --- DESCRIPTION | 4 ++-- R/prepare_predictions.R | 2 +- man/prepare_predictions.Rd | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 16bc6715e..36e453f6b 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -2,8 +2,8 @@ Package: brms Encoding: UTF-8 Type: Package Title: Bayesian Regression Models using 'Stan' -Version: 2.22.2 -Date: 2024-10-02 +Version: 2.22.3 +Date: 2024-10-30 Authors@R: c(person("Paul-Christian", "Bürkner", email = "paul.buerkner@gmail.com", role = c("aut", "cre")), diff --git a/R/prepare_predictions.R b/R/prepare_predictions.R index ccdeffd1e..1b0d9b415 100644 --- a/R/prepare_predictions.R +++ b/R/prepare_predictions.R @@ -28,7 +28,7 @@ prepare_predictions.brmsfit <- function( resp <- validate_resp(resp, x) draw_ids <- validate_draw_ids(x, draw_ids, ndraws) draws <- as_draws_matrix(x) - draws <- suppressMessages(subset_draws(draws, draw = draw_ids)) + draws <- suppressMessages(subset_draws(draws, draw = draw_ids, unique = FALSE)) draws <- point_draws(draws, point_estimate, ndraws_point_estimate) sdata <- standata( diff --git a/man/prepare_predictions.Rd b/man/prepare_predictions.Rd index 4062895fd..b69bb6628 100644 --- a/man/prepare_predictions.Rd +++ b/man/prepare_predictions.Rd @@ -125,7 +125,7 @@ An object of class \code{'brmsprep'} or \code{'mvbrmsprep'}, depending on whether a univariate or multivariate model is passed. } \description{ -This method helps in preparing \pkg{brms} models for certin post-processing +This method helps in preparing \pkg{brms} models for certain post-processing tasks most notably various forms of predictions. Unless you are a package developer, you will rarely need to call \code{prepare_predictions} directly. }