Learn R Programming

RoBMA (version 4.0.0)

as_draws.brma_samples: Convert brma_samples to posterior Draws Formats

Description

Provides 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 brma_samples
as_draws(x, ...)

# S3 method for brma_samples as_draws_array(x, ...)

# S3 method for brma_samples as_draws_df(x, ...)

# S3 method for brma_samples as_draws_list(x, ...)

# S3 method for brma_samples as_draws_matrix(x, ...)

# S3 method for brma_samples as_draws_rvars(x, ...)

Value

An object of the corresponding posterior draws class.

Arguments

x

a brma_samples object

...

additional arguments passed to the corresponding posterior function

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.

See Also

draws, as_draws.brma