% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/bridgesampling.R
\name{bridge_sampler.brma}
\alias{bridge_sampler.brma}
\title{Bridge Sampling for brma Objects}
\usage{
\method{bridge_sampler}{brma}(samples, ...)
}
\arguments{
\item{samples}{a brma model object.}

\item{...}{additional arguments (currently not used).}
}
\value{
An object of class \code{"bridge"} as returned by
\code{\link[bridgesampling]{bridge_sampler}}.
}
\description{
Extract the marginal likelihood bridge sampling object from
a brma model. The marginal likelihood must first be computed using
\code{\link{add_marglik}}.
}
\details{
This function extracts the bridge sampling object that was previously
computed and stored using \code{\link{add_marglik}}. If the marginal
likelihood has not been computed, an error is thrown.
Product-space model-averaging objects (\code{BMA.norm}, \code{BMA.glmm},
and \code{RoBMA}) do not expose bridge-sampling marginal likelihoods.

The returned object can be used for Bayesian model comparison via
\code{\link{bf}} and \code{\link{post_prob}}.
}
\examples{
\dontrun{
if (requireNamespace("metadat", quietly = TRUE)) {
  data(dat.lehmann2018, package = "metadat")
  fit <- brma(yi = yi, vi = vi, data = dat.lehmann2018, measure = "SMD")

  fit <- add_marglik(fit)

  bridge <- bridge_sampler(fit)
  print(bridge)
}
}

}
\seealso{
\code{\link{add_marglik}}, \code{\link[bridgesampling]{bridge_sampler}},
\code{\link{logml.brma}}, \code{\link{bf.brma}}, \code{\link{post_prob.brma}}
}
