% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/baujat.R
\name{baujat.meta}
\alias{baujat.meta}
\alias{baujat}
\title{Baujat plot to explore heterogeneity in meta-analysis}
\usage{
\method{baujat}{meta}(
  x,
  yscale = 1,
  xlim,
  ylim,
  xlab = "Contribution to overall heterogeneity",
  ylab = "Influence on overall result",
  pch = 21,
  cex = 1,
  col = "black",
  bg = "darkgray",
  studlab = TRUE,
  cex.studlab = 0.8,
  pos.studlab,
  offset = 0.5,
  xmin = 0,
  ymin = 0,
  grid = TRUE,
  col.grid = "lightgray",
  lty.grid = "dotted",
  lwd.grid = par("lwd"),
  pty = "s",
  pooled,
  ...
)
}
\arguments{
\item{x}{An object of class \code{meta}.}

\item{yscale}{Scaling factor for values on y-axis.}

\item{xlim}{The x limits (min,max) of the plot.}

\item{ylim}{The y limits (min,max) of the plot.}

\item{xlab}{A label for the x-axis.}

\item{ylab}{A label for the y-axis.}

\item{pch}{The plotting symbol used for individual studies.}

\item{cex}{The magnification to be used for plotting symbol.}

\item{col}{A vector with colour of plotting symbols.}

\item{bg}{A vector with background colour of plotting symbols (only
used if \code{pch} in \code{21:25}).}

\item{studlab}{A logical indicating whether study labels should be
printed in the graph. A vector with study labels can also be
provided (must be of same length as \code{x$TE} then).}

\item{cex.studlab}{The magnification for study labels.}

\item{pos.studlab}{Position of study labels, see argument
\code{pos} in \code{\link{text}}.}

\item{offset}{Offset for study labels (see \code{\link{text}}).}

\item{xmin}{A numeric specifying minimal value to print study
labels (on x-axis).}

\item{ymin}{A numeric specifying minimal value to print study
labels (on y-axis).}

\item{grid}{A logical indicating whether a grid is printed in the
plot.}

\item{col.grid}{Colour for grid lines.}

\item{lty.grid}{The line type for grid lines.}

\item{lwd.grid}{The line width for grid lines.}

\item{pty}{A character specifying type of plot region (see
\code{\link{par}}).}

\item{pooled}{A character string indicating whether a common effect
or random effects model is used for pooling. Either missing (see
Details), \code{"common"} or \code{"random"}, can be abbreviated.}

\item{\dots}{Graphical arguments as in \code{par} may also be
passed as arguments.}
}
\value{
A data.frame with the following variables:
\item{x}{Coordinate on x-axis (contribution to heterogeneity
  statistic)}
\item{y}{Coordinate on y-axis (influence on overall treatment
  effect)}
}
\description{
Draw a Baujat plot to explore heterogeneity in meta-analysis.
}
\details{
Baujat et al. (2002) introduced a scatter plot to explore
heterogeneity in meta-analysis. On the x-axis the contribution of
each study to the overall heterogeneity statistic (see list object
\code{Q} of the meta-analysis object \code{x}) is plotted. On the
y-axis the standardised difference of the overall treatment effect
with and without each study is plotted; this quantity describes the
influence of each study on the overal treatment effect.

Information from object \code{x} is utilised if argument
\code{pooled} is missing. A common effect model is assumed
(\code{pooled="common"}) if argument \code{x$common} is
\code{TRUE}; a random effects model is assumed
(\code{pooled="random"}) if argument \code{x$random} is
\code{TRUE} and \code{x$common} is \code{FALSE}.

Internally, the \code{\link{metainf}} function is used to calculate
the values on the y-axis.
}
\examples{
data(Olkin1995)

# Only consider first ten studies
ma1 <- metabin(ev.exp, n.exp, ev.cont, n.cont,
  data = Olkin1995, sm = "OR", method = "I", studlab = paste(author, year),
  subset = 1:10)

# Generate Baujat plot
baujat(ma1)

\dontrun{
ma2 <- metabin(ev.exp, n.exp, ev.cont, n.cont,
  data = Olkin1995, sm = "OR", method = "I", studlab = paste(author, year))

# Do not print study labels if the x-value is smaller than 4 and
# the y-value is smaller than 1
baujat(ma2, yscale = 10, xmin = 4, ymin = 1)

# Change position of study labels
baujat(ma2, yscale = 10, xmin = 4, ymin = 1,
  pos = 1, xlim = c(0, 6.5))

# Generate Baujat plot and assign x- and y- coordinates to R object
# ba2
ba2 <- baujat(ma2)

# Calculate overall heterogeneity statistic
sum(ba2$x)
ma2$Q
}

}
\references{
Baujat B, Mahé C, Pignon JP, Hill C (2002):
A graphical method for exploring heterogeneity in meta-analyses:
Application to a meta-analysis of 65 trials.
\emph{Statistics in Medicine},
\bold{30}, 2641--52
}
\seealso{
\code{\link{metagen}}, \code{\link{metainf}}
}
\author{
Guido Schwarzer \email{guido.schwarzer@uniklinik-freiburg.de}
}
\keyword{hplot}
