% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/as_draws.R
\name{as_draws.brma}
\alias{as_draws.brma}
\alias{as_draws}
\alias{as_draws_array}
\alias{as_draws_df}
\alias{as_draws_list}
\alias{as_draws_matrix}
\alias{as_draws_rvars}
\alias{as_draws.default}
\alias{as_draws_array.default}
\alias{as_draws_df.default}
\alias{as_draws_list.default}
\alias{as_draws_matrix.default}
\alias{as_draws_rvars.default}
\alias{as_draws_array.brma}
\alias{as_draws_df.brma}
\alias{as_draws_list.brma}
\alias{as_draws_matrix.brma}
\alias{as_draws_rvars.brma}
\title{Convert brma Objects to posterior Draws Formats}
\usage{
as_draws(x, ...)

as_draws_array(x, ...)

as_draws_df(x, ...)

as_draws_list(x, ...)

as_draws_matrix(x, ...)

as_draws_rvars(x, ...)

\method{as_draws}{default}(x, ...)

\method{as_draws_array}{default}(x, ...)

\method{as_draws_df}{default}(x, ...)

\method{as_draws_list}{default}(x, ...)

\method{as_draws_matrix}{default}(x, ...)

\method{as_draws_rvars}{default}(x, ...)

\method{as_draws}{brma}(x, ...)

\method{as_draws_array}{brma}(x, ...)

\method{as_draws_df}{brma}(x, ...)

\method{as_draws_list}{brma}(x, ...)

\method{as_draws_matrix}{brma}(x, ...)

\method{as_draws_rvars}{brma}(x, ...)
}
\arguments{
\item{x}{an object to convert. The \code{brma} methods expect a fitted
\code{brma} object; default methods forward non-\code{brma} objects to the
corresponding \pkg{posterior} conversion function.}

\item{...}{additional arguments passed to the corresponding
\pkg{posterior} function.}
}
\value{
An object of the corresponding \pkg{posterior} draws class.
}
\description{
Provides an interface to the \pkg{posterior} package
for \code{brma} objects. These functions convert the MCMC samples
from a fitted \code{brma} model to various draws formats supported
by the \pkg{posterior} package, enabling the use of posterior's
rich set of diagnostics and summary functions.
}
\details{
These functions are S3 generics. Their default methods forward to the
corresponding \pkg{posterior} generics so attaching \pkg{RoBMA} preserves
the usual \pkg{posterior} behavior for non-\code{brma} objects.

The following conversion functions are available:
\itemize{
\item \code{as_draws}: converts to the default draws format
\item \code{as_draws_array}: converts to a 3-D array (iteration x chain x variable)
\item \code{as_draws_df}: converts to a data frame with columns for iterations, chains, and variables
\item \code{as_draws_list}: converts to a list of lists
\item \code{as_draws_matrix}: converts to a 2-D matrix (draw x variable)
\item \code{as_draws_rvars}: converts to random variable objects
}

These methods require the \pkg{posterior} package to be installed.
For \code{brma} methods, conversion is performed by first extracting the MCMC
samples as a \code{mcmc.list} object and then using the corresponding
\pkg{posterior} conversion function. \code{brma_samples} objects have
separate methods documented at \code{\link{as_draws.brma_samples}}.
}
\seealso{
\code{\link[posterior]{draws}}, \code{\link{brma}},
\code{\link{as_draws.brma_samples}}
}
