% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/plot.R
\name{plot_pet_peese}
\alias{plot_pet_peese}
\alias{plot_pet_peese.brma}
\title{Plot PET-PEESE Fit of brma Object}
\usage{
plot_pet_peese(x, ...)

\method{plot_pet_peese}{brma}(
  x,
  show_data = TRUE,
  prior = FALSE,
  plot_type = "base",
  dots_prior = NULL,
  ...
)
}
\arguments{
\item{x}{a fitted brma object with a PET or PEESE component.}

\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},
\code{pch}, \code{bg}, \code{cex}, and \code{size}
to adjust the line thickness, line type, line color, fill color,
x-label, y-label, title, x-axis range, y-axis range, and observed data
point style respectively.}

\item{show_data}{whether the observed effect sizes should be added to
figure. Defaults to \code{TRUE}.}

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

\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.}
}
\value{
\code{plot_pet_peese} returns either \code{NULL} invisibly if
\code{plot_type = "base"} or a ggplot2 object if
\code{plot_type = "ggplot"}.
}
\description{
\code{plot_pet_peese} visualizes posterior
(and prior) PET-PEESE fit of a brma object.
}
\details{
The plot shows observed \code{yi} values against \code{sei}. PET
regression uses \eqn{\mu + PET \cdot se_i}; PEESE regression uses
\eqn{\mu + PEESE \cdot se_i^2}, with the fitted effect direction.
}
\examples{
\dontrun{
if (requireNamespace("metadat", quietly = TRUE)) {
  data(dat.lehmann2018, package = "metadat")

  fit <- bPET(
    yi      = yi,
    vi      = vi,
    data    = dat.lehmann2018,
    measure = "SMD",
    seed    = 1,
    silent  = TRUE
  )

  plot_pet_peese(fit)
}
}


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