% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/metacr.R
\name{metacr}
\alias{metacr}
\title{Meta-analysis of outcome data from Cochrane review}
\usage{
metacr(
  x,
  comp.no = 1,
  outcome.no = 1,
  method,
  sm,
  level = gs("level"),
  common,
  random,
  prediction = gs("prediction") | !missing(method.predict),
  method.tau = "DL",
  method.tau.ci = gs("method.tau.ci"),
  level.hetstat = gs("level.hetstat"),
  tau.common = FALSE,
  method.I2 = gs("method.I2"),
  level.ma = gs("level.ma"),
  method.random.ci = "classic",
  adhoc.hakn.ci = gs("adhoc.hakn.ci"),
  level.predict = gs("level.predict"),
  method.predict = gs("method.predict"),
  adhoc.hakn.pi = gs("adhoc.hakn.pi"),
  seed.predict = NULL,
  Q.Cochrane,
  swap.events,
  logscale,
  backtransf = gs("backtransf"),
  test.subgroup,
  prediction.subgroup = gs("prediction.subgroup"),
  seed.predict.subgroup = NULL,
  rob = NULL,
  tool = NULL,
  categories = NULL,
  col = NULL,
  symbols = NULL,
  text.common = gs("text.common"),
  text.random = gs("text.random"),
  text.predict = gs("text.predict"),
  text.w.common = gs("text.w.common"),
  text.w.random = gs("text.w.random"),
  title,
  complab,
  outclab,
  col.label.left = gs("col.label.left"),
  col.label.right = gs("col.label.right"),
  keepdata = gs("keepdata"),
  warn = FALSE,
  warn.deprecated = gs("warn.deprecated"),
  ...
)
}
\arguments{
\item{x}{An object of class \code{rm5} or \code{cdir} created by R
function \code{read.rm5} or \code{read.cdir} .}

\item{comp.no}{Comparison number.}

\item{outcome.no}{Outcome number.}

\item{method}{A character string indicating which method is to be
used for pooling of studies. One of \code{"Inverse"},
\code{"MH"}, or \code{"Peto"}, can be abbreviated.}

\item{sm}{A character string indicating which summary measure
(\code{"RR"}, \code{"OR"}, \code{"RD"}, \code{"ASD"},
\code{"HR"}, \code{"MD"}, or \code{"SMD"}, or \code{"ROM"}) is to
be used for pooling of studies.}

\item{level}{The level used to calculate confidence intervals for
individual studies.}

\item{common}{A logical indicating whether a common effect
meta-analysis should be conducted.}

\item{random}{A logical indicating whether a random effects
meta-analysis should be conducted.}

\item{prediction}{A logical indicating whether a prediction
interval should be printed.}

\item{method.tau}{A character string indicating which method is
used to estimate the between-study variance \eqn{\tau^2} and its
square root \eqn{\tau} (see \code{\link{meta-package}}).}

\item{method.tau.ci}{A character string indicating which method is
used to estimate the confidence interval of \eqn{\tau^2} and
\eqn{\tau} (see \code{\link{meta-package}}).}

\item{level.hetstat}{The level used to calculate confidence intervals
for heterogeneity statistics.}

\item{tau.common}{A logical indicating whether tau-squared should
be the same across subgroups.}

\item{method.I2}{A character string indicating which method is
used to estimate the heterogeneity statistic I\eqn{^2}. Either
\code{"Q"} or \code{"tau2"}, can be abbreviated
(see \code{\link{meta-package}}).}

\item{level.ma}{The level used to calculate confidence intervals
for meta-analysis estimates.}

\item{method.random.ci}{A character string indicating which method
is used to calculate confidence interval and test statistic for
random effects estimate (see \code{\link{meta-package}}).}

\item{adhoc.hakn.ci}{A character string indicating whether an
\emph{ad hoc} variance correction should be applied in the case
of an arbitrarily small Hartung-Knapp variance estimate (see
\code{\link{meta-package}}).}

\item{level.predict}{The level used to calculate prediction
interval for a new study.}

\item{method.predict}{A character string indicating which method is
used to calculate a prediction interval (see
\code{\link{meta-package}}).}

\item{adhoc.hakn.pi}{A character string indicating whether an
\emph{ad hoc} variance correction should be applied for
prediction interval (see \code{\link{meta-package}}).}

\item{seed.predict}{A numeric value used as seed to calculate
bootstrap prediction interval (see \code{\link{meta-package}}).}

\item{Q.Cochrane}{A logical indicating if the Mantel-Haenszel
estimate is used in the calculation of the heterogeneity
statistic Q which is implemented in RevMan 5.}

\item{swap.events}{A logical indicating whether events and
non-events should be interchanged.}

\item{logscale}{A logical indicating whether effect estimates are
entered on log-scale (ignored for \code{cdir} objects).}

\item{backtransf}{A logical indicating whether results should be
back transformed in printouts and plots. If
\code{backtransf=TRUE} (default), results for \code{sm="OR"} are
printed as odds ratios rather than log odds ratios and results
for \code{sm="ZCOR"} are printed as correlations rather than
Fisher's z transformed correlations, for example.}

\item{test.subgroup}{A logical value indicating whether to print
results of test for subgroup differences.}

\item{prediction.subgroup}{A logical indicating whether prediction
intervals should be printed for subgroups.}

\item{seed.predict.subgroup}{A numeric vector providing seeds to
calculate bootstrap prediction intervals within subgroups. Must
be of same length as the number of subgroups.}

\item{rob}{A logical indicating whether risk of bias (RoB)
assessment should be considered in meta-analysis (only for
\code{read.cdir} objects).}

\item{tool}{Risk of bias (RoB) tool (only for \code{read.cdir}
objects).}

\item{categories}{Possible RoB categories (only for
\code{read.cdir} objects).}

\item{col}{Colours for RoB categories (only for \code{read.cdir}
objects).}

\item{symbols}{Corresponding symbols for RoB categories (only for
\code{read.cdir} objects).}

\item{text.common}{A character string used in printouts and forest
plot to label the pooled common effect estimate.}

\item{text.random}{A character string used in printouts and forest
plot to label the pooled random effects estimate.}

\item{text.predict}{A character string used in printouts and forest
plot to label the prediction interval.}

\item{text.w.common}{A character string used to label weights of
common effect model.}

\item{text.w.random}{A character string used to label weights of
random effects model.}

\item{title}{Title of meta-analysis / systematic review.}

\item{complab}{Comparison label.}

\item{outclab}{Outcome label.}

\item{col.label.left}{The colour of the graph label on the left side of
the null effect.}

\item{col.label.right}{The colour of the graph label on the right side of
the null effect.}

\item{keepdata}{A logical indicating whether original data (set)
should be kept in meta object.}

\item{warn}{A logical indicating whether warnings should be printed
(e.g., if \code{incr} is added to studies with zero cell
frequencies).}

\item{warn.deprecated}{A logical indicating whether warnings should
be printed if deprecated arguments are used.}

\item{\dots}{Additional arguments (to catch deprecated arguments).}
}
\value{
An object of class \code{"meta"} and - depending on outcome type
utilised in Cochrane intervention review for selected outcome -
\code{"metabin"}, \code{"metacont"}, or \code{"metagen"} with
corresponding generic functions (see \code{\link{meta-object}}).
}
\description{
Wrapper function to perform meta-analysis for a single outcome of a
Cochrane Intervention review.
}
\details{
Cochrane intervention reviews are based on the comparison of two
interventions. Each Cochrane intervention review can have a
variable number of comparisons. For each comparison, a variable
number of outcomes can be define. For each outcome, a seperate
meta-analysis is conducted. Review Manager 5 (RevMan 5) was the
software used for preparing and maintaining Cochrane Reviews
(\url{https://training.cochrane.org/online-learning/core-software/revman}).

This wrapper function can be used to perform meta-analysis for a
single outcome of a Cochrane intervention review. Internally, R
functions \code{\link{metabin}}, \code{\link{metacont}}, and
\code{\link{metagen}} are called - depending on the definition of
the outcome in RevMan 5.

Information on the risk of bias RoB) assessment can be provided
with arguments \code{tool}, \code{categories}, \code{col} and
\code{symbols}. This is not useful if an overall RoB assessment has
been done. In this case use \code{\link{rob}} to add the full
flexible RoB information to a \code{\link{metacr}} object.

Note, it is recommended to choose the RevMan 5 settings before
executing \code{metacr}, i.e., \code{settings.meta("revman5")}.
}
\examples{
# Locate export data file "Fleiss1993_CR.csv"
# in sub-directory of package "meta"
#
filename <- system.file("extdata", "Fleiss1993_CR.csv", package = "meta")
#
Fleiss1993_CR <- read.rm5(filename)

# Choose RevMan 5 settings and store old settings
#
oldset <- settings.meta("revman5", quietly = FALSE)

# Same result as R command example(Fleiss1993bin)
#
metacr(Fleiss1993_CR)

# Same result as R command example(Fleiss1993cont)
#
metacr(Fleiss1993_CR, 1, 2)
forest(metacr(Fleiss1993_CR, 1, 2))

# Change summary measure to RR
#
m1 <- metacr(Fleiss1993_CR)
update(m1, sm="RR")

# Use old settings
#
settings.meta(oldset)

}
\references{
\emph{Review Manager (RevMan)} [Computer program]. Version 5.4.
The Cochrane Collaboration, 2020
}
\seealso{
\code{\link{meta-package}}, \code{\link{rob}},
  \code{\link{metabin}}, \code{\link{metacont}},
  \code{\link{metagen}}, \code{\link{read.cdir}},
  \code{\link{read.rm5}}, \code{\link{settings.meta}}
}
\author{
Guido Schwarzer \email{guido.schwarzer@uniklinik-freiburg.de}
}
