% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/plot.R
\name{plot.brma}
\alias{plot.brma}
\title{Plots brma Object}
\usage{
\method{plot}{brma}(
  x,
  parameter,
  parameter_mods,
  parameter_scale,
  prior = FALSE,
  standardized_coefficients = FALSE,
  conditional = FALSE,
  output_measure = NULL,
  transform = NULL,
  plot_type = "base",
  dots_prior = NULL,
  ...
)
}
\arguments{
\item{x}{a fitted \code{brma}, \code{BMA}, or \code{RoBMA} object.}

\item{parameter}{a parameter to be plotted. Defaults to \code{"mu"} for
the effect size, or to the meta-regression intercept when moderators are
present. Additional options are \code{"tau"}, \code{"rho"} for multilevel
models, \code{"PET"}, \code{"PEESE"}, and \code{"omega"} or
\code{"weightfunction"} for selection models. Use \code{plot_pet_peese()}
for PET/PEESE regression plots.}

\item{parameter_mods}{character. Moderator term to plot. Use
\code{"intercept"} for the adjusted effect in meta-regression models.}

\item{parameter_scale}{character. Scale-regression term to plot. Use
\code{"intercept"} for the heterogeneity intercept in location-scale models.}

\item{prior}{whether prior distribution should be added to
figure. Defaults to \code{FALSE}.}

\item{standardized_coefficients}{whether to plot moderator and
scale-regression coefficients on the standardized predictor scale. Defaults
to \code{FALSE}.}

\item{conditional}{whether to plot the conditional posterior distribution
for RoBMA product-space objects. Defaults to \code{FALSE}.}

\item{output_measure}{effect-size measure for location/effect predictions.
Defaults to the fitted measure. Supported conversions are among \code{"SMD"},
\code{"COR"}, \code{"ZCOR"}, and \code{"OR"}; \code{"RR"}, \code{"HR"},
\code{"IRR"}, \code{"RD"}, and \code{"GEN"} can only be returned on their
fitted measure. Use \code{transform = "EXP"} for ratio-scale output from
log-scale measures.}

\item{transform}{optional display transformation. Currently \code{"EXP"}
exponentiates log-scale measures \code{"OR"}, \code{"RR"}, \code{"HR"},
and \code{"IRR"}.}

\item{plot_type}{whether to use a base plot \code{"base"}
or ggplot2 \code{"ggplot"} for plotting. Defaults to
\code{"base"}.}

\item{dots_prior}{list of additional graphical arguments
to be passed to the plotting function of the prior
distribution. Supported arguments are \code{lwd},
\code{lty}, \code{col}, and \code{col.fill}, to adjust
the line thickness, line type, line color, and fill color
of the prior distribution respectively.}

\item{...}{list of additional graphical arguments
to be passed to the plotting function. Supported arguments
are \code{lwd}, \code{lty}, \code{col}, \code{col.fill},
\code{xlab}, \code{ylab}, \code{main}, \code{xlim}, \code{ylim}
to adjust the line thickness, line type, line color, fill color,
x-label, y-label, title, x-axis range, and y-axis range
respectively.}
}
\value{
\code{plot.brma} returns either \code{NULL} if \code{plot_type = "base"}
or a \code{ggplot2} object if \code{plot_type = "ggplot"}.
}
\description{
\code{plot.brma} visualizes posterior
(and prior) distribution a brma object.
}
\examples{
\dontrun{
if (requireNamespace("metadat", quietly = TRUE)) {
  data(dat.lehmann2018, package = "metadat")
  fit <- bPET(yi = yi, vi = vi, data = dat.lehmann2018, measure = "SMD")

  plot(fit, parameter = "mu")
  plot(fit, parameter = "tau", prior = TRUE)
  plot(fit, parameter = "PET")
}
}


}
\seealso{
\code{\link[=RoBMA]{RoBMA()}}
}
