| as_draws.brma | R Documentation |
Provides an interface to the posterior package
for brma objects. These functions convert the MCMC samples
from a fitted brma model to various draws formats supported
by the posterior package, enabling the use of posterior's
rich set of diagnostics and summary functions.
as_draws(x, ...)
as_draws_array(x, ...)
as_draws_df(x, ...)
as_draws_list(x, ...)
as_draws_matrix(x, ...)
as_draws_rvars(x, ...)
## Default S3 method:
as_draws(x, ...)
## Default S3 method:
as_draws_array(x, ...)
## Default S3 method:
as_draws_df(x, ...)
## Default S3 method:
as_draws_list(x, ...)
## Default S3 method:
as_draws_matrix(x, ...)
## Default S3 method:
as_draws_rvars(x, ...)
## S3 method for class 'brma'
as_draws(x, ...)
## S3 method for class 'brma'
as_draws_array(x, ...)
## S3 method for class 'brma'
as_draws_df(x, ...)
## S3 method for class 'brma'
as_draws_list(x, ...)
## S3 method for class 'brma'
as_draws_matrix(x, ...)
## S3 method for class 'brma'
as_draws_rvars(x, ...)
x |
an object to convert. The |
... |
additional arguments passed to the corresponding posterior function. |
These functions are S3 generics. Their default methods forward to the
corresponding posterior generics so attaching RoBMA preserves
the usual posterior behavior for non-brma objects.
The following conversion functions are available:
as_draws: converts to the default draws format
as_draws_array: converts to a 3-D array (iteration x chain x variable)
as_draws_df: converts to a data frame with columns for iterations, chains, and variables
as_draws_list: converts to a list of lists
as_draws_matrix: converts to a 2-D matrix (draw x variable)
as_draws_rvars: converts to random variable objects
These methods require the posterior package to be installed.
For brma methods, conversion is performed by first extracting the MCMC
samples as a mcmc.list object and then using the corresponding
posterior conversion function. brma_samples objects have
separate methods documented at as_draws.brma_samples.
An object of the corresponding posterior draws class.
draws, brma,
as_draws.brma_samples
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.