Brms generator uses a brms model with sample_prior = "only" to generate new datasets.

SBC_generator_brms(
  formula,
  data,
  ...,
  generate_lp = TRUE,
  generate_lp_chunksize = 5000/nrow(data),
  out_stan_file = NULL
)

Arguments

formula, data, ...

arguments passed to brms::brm

generate_lp

whether to compute the overall log-likelihood of the model as an additional variable. This can be somewhat computationally expensive, but improves sensitivity of the SBC process.

generate_lp_chunksize

Will determine whether the chunk size used with future.apply::future_mapply(). Set quite high by default as the parallelism only benefits for large individual datasets/number of simulations.

out_stan_file

A filename for the generated Stan code. Useful for debugging and for avoiding unnecessary recompilations.