Skip to content

Commit

Permalink
allow to set save_pars globally
Browse files Browse the repository at this point in the history
  • Loading branch information
paul-buerkner committed Dec 5, 2023
1 parent d1a0508 commit a9943f6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
7 changes: 4 additions & 3 deletions R/brm.R
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,8 @@
#' variables defined in Stan's \code{parameters} block should be saved
#' (default is \code{FALSE}). Saving these draws is required in order to
#' apply the methods \code{bridge_sampler}, \code{bayes_factor}, and
#' \code{post_prob}.
#' \code{post_prob}. Can be set globally for the current \R session via the
#' \code{"brms.save_pars"} option (see \code{\link{options}}).
#' @param sample_prior Indicate if draws from priors should be drawn
#' additionally to the posterior draws. Options are \code{"no"} (the
#' default), \code{"yes"}, and \code{"only"}. Among others, these draws can
Expand Down Expand Up @@ -436,8 +437,8 @@ brm <- function(formula, data, family = gaussian(), prior = NULL,
autocor = NULL, data2 = NULL, cov_ranef = NULL,
sample_prior = "no", sparse = NULL, knots = NULL,
drop_unused_levels = TRUE, stanvars = NULL, stan_funs = NULL,
fit = NA, save_pars = NULL, save_ranef = NULL,
save_mevars = NULL, save_all_pars = NULL,
fit = NA, save_pars = getOption("brms.save_pars", NULL),
save_ranef = NULL, save_mevars = NULL, save_all_pars = NULL,
init = NULL, inits = NULL, chains = 4, iter = 2000,
warmup = floor(iter / 2), thin = 1,
cores = getOption("mc.cores", 1),
Expand Down
5 changes: 3 additions & 2 deletions man/brm.Rd

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

0 comments on commit a9943f6

Please sign in to comment.