% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/bridgesampling.R
\name{post_prob.brma}
\alias{post_prob.brma}
\title{Posterior Model Probabilities for brma Objects}
\usage{
\method{post_prob}{brma}(x, ..., prior_prob = NULL, model_names = NULL)
}
\arguments{
\item{x}{a brma model object.}

\item{...}{additional brma model objects.}

\item{prior_prob}{numeric vector with prior model probabilities or weights.
Values must be finite, nonnegative, have the same length as the retained
models, and have a positive total. If omitted, a uniform prior is used.
Supplied values are normalized internally.}

\item{model_names}{character vector with model names. If \code{NULL}
(the default), names will be derived from deparsing the call.}
}
\value{
A named numeric vector with posterior model probabilities
(i.e., which sum to one).
}
\description{
Compute posterior model probabilities from marginal
likelihoods of brma models.
}
\details{
The marginal likelihoods must first be computed using \code{\link{add_marglik}}.
\code{x} and at least one additional \code{brma} model must be supplied.
Non-\code{brma} objects in \code{...} are ignored with a warning. All retained
models must be fitted to the same outcome target/data, including outcome type
and, when present, weights and cluster identifiers.
}
\examples{
\dontrun{
if (requireNamespace("metadat", quietly = TRUE)) {
  data(dat.lehmann2018, package = "metadat")
  fit1 <- brma(yi = yi, vi = vi, data = dat.lehmann2018, measure = "SMD")
  fit2 <- brma(
    yi           = yi,
    vi           = vi,
    data         = dat.lehmann2018,
    measure      = "SMD",
    prior_effect = FALSE
  )

  fit1 <- add_marglik(fit1)
  fit2 <- add_marglik(fit2)

  post_prob(fit1, fit2)
}
}

}
\seealso{
\code{\link{add_marglik}}, \code{\link{bridge_sampler.brma}},
\code{\link{bf.brma}}, \code{\link{logml.brma}}
}
