Convert brma_samples to posterior Draws Formats
Source:R/brma_samples.as_draws.R
as_draws.brma_samples.RdProvides an interface to the posterior package
for brma_samples objects. These functions convert the posterior
samples to various draws formats supported by the posterior package.
Usage
# S3 method for class 'brma_samples'
as_draws(x, ...)
# S3 method for class 'brma_samples'
as_draws_array(x, ...)
# S3 method for class 'brma_samples'
as_draws_df(x, ...)
# S3 method for class 'brma_samples'
as_draws_list(x, ...)
# S3 method for class 'brma_samples'
as_draws_matrix(x, ...)
# S3 method for class 'brma_samples'
as_draws_rvars(x, ...)Details
The conversion reconstructs the MCMC chain structure from the stored
nchains and niter attributes. The samples are assumed
to be ordered with chains concatenated (i.e., all iterations from chain 1,
then all from chain 2, etc.). Conditional RoBMA samples are intentionally
stored as one flattened chain because conditioning subsets posterior rows
across chains.