bbr.bayes models define methods for posterior::as_draws() that enable constructing a draws object directly from a model object. In addition to as_draws(), format-specific functions, such as posterior::as_draws_df() and posterior::as_draws_rvars(), are also supported.

# S3 method for bbi_nmbayes_model
as_draws(x, ...)

# S3 method for bbi_stan_model
as_draws(x, ...)

Arguments

x

Model object.

...

Additional arguments used by specific methods.

Value

A posterior draws object.

Details

It is possible to get the same values via read_fit_model(), though the details depend on the model type.

  • bbi_nmbayes_model: as_draws() and friends behaves the same as calling read_fit_model().

  • bbi_stan_model: as_draws() and friends are a shortcut for calling the same methods on the CmdStanMCMC object returned by read_fit_model() or for using the draws method of the CmdStanMCMC object.