% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/rd.R
\name{rd}
\alias{rd}
\alias{rd.default}
\alias{rd.meta}
\alias{print.rd.meta}
\alias{print.rd.default}
\title{Calculate the risk difference from meta-analysis results}
\usage{
rd(x, ...)

\method{rd}{meta}(
  x,
  p.c,
  common = x$common,
  random = x$random,
  small.values = "desirable",
  pscale = 1,
  ...
)

\method{rd}{default}(
  x,
  p.c,
  sm,
  lower,
  upper,
  level = gs("level.ma"),
  small.values = "desirable",
  pscale = 1,
  transf = FALSE,
  ...
)

\method{print}{rd.meta}(
  x,
  common = !is.null(x$common),
  random = !is.null(x$random),
  pscale = attributes(x)$pscale,
  digits = gs("digits"),
  digits.prop = gs("digits.prop"),
  big.mark = gs("big.mark"),
  details = gs("details"),
  ...
)

\method{print}{rd.default}(
  x,
  pscale = attributes(x)$pscale,
  digits = gs("digits"),
  digits.prop = gs("digits.prop"),
  big.mark = gs("big.mark"),
  ...
)
}
\arguments{
\item{x}{An object of class \code{meta}, or estimated treatment
effect(s), i.e., risk difference(s), risk ratio(s), odds
ratio(s), or hazard ratio(s).}

\item{\dots}{Additional arguments (ignored)}

\item{p.c}{Baseline probability, i.e., control group event probability
for binary outcomes or survival probability in control group for
hazard ratios.}

\item{common}{A logical indicating whether ARRs / ABIs should be
calculated based on common effect estimate.}

\item{random}{A logical indicating whether ARRs / ABIs should be
calculated based on random effects estimate.}

\item{small.values}{A character string specifying whether small
treatment effects indicate a beneficial (\code{"desirable"}) or
harmful (\code{"undesirable"}) effect, can be abbreviated.}

\item{pscale}{A numeric defining a scaling factor for printing of
absolute risk reduction or absolute benefit increase.}

\item{sm}{Summary measure.}

\item{lower}{Lower confidence interval limit.}

\item{upper}{Upper confidence interval limit.}

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

\item{transf}{A logical indicating whether treatment estimates and
confidence limits are transformed or on the original scale.
If \code{transf = TRUE}, inputs are expected to be log odds ratios instead
of odds ratios for \code{sm = "OR"}, for example.}

\item{digits}{Minimal number of significant digits to print ARR / ABI and its
confidence interval, see \code{print.default}.}

\item{digits.prop}{Minimal number of significant digits for
proportions, see \code{print.default}.}

\item{big.mark}{A character used as thousands separator.}

\item{details}{A logical specifying whether details should be printed.}
}
\description{
Calculate the risk difference from the risk ratio, odds ratio, or hazard
ratio, and a baseline probability, i.e., control group event probability for
binary outcomes or survival probability for hazard ratios. Results are
reported as absolute risk reduction/increase or absolute benefit
increase/reduction.
}
\details{
Calculate the risk difference from the risk ratio, odds ratio, or hazard
ratio, and a baseline probability, i.e., control group event probability for
binary outcomes or survival probability for hazard ratios. Report results as
absolute risk reduction (ARR), absolute risk increase (ARI), absolute
benefit increase (ABI), or absolute benefit reduction (ABR).

Absolute measures can be easily computed from an estimated risk
difference (RD), or a risk ratio (RR) or odds ratio (OR) and a given
baseline probability. It is also possible to calculate absolute
measures from hazard ratios (HR) (Altman & Andersen, 1999).
Accordingly, these measures can be calculated for meta-analyses
generated with \code{\link{metabin}} or \code{\link{metagen}}
if argument \code{sm} was equal to \code{"RD"}, \code{"RR"},
\code{"OR"}, or \code{"HR"}. It is also possible to provide only
estimated treatment effects and baseline probabilities (see Examples).

The baseline probability can be specified using argument \code{p.c}. If
this argument is missing, the minimum, mean, and maximum of the
control event probabilities in the meta-analysis are used for
\code{\link{metabin}} and control event probabilities of 0.1, 0.2,
\dots, 0.9 are used for \code{\link{metagen}}. Note, the survival instead of
mortality probability must be provided for hazard ratios.

Argument \code{small.values} can be used to specify whether small
treatment effects indicate a beneficial (\code{"desirable"}) or harmful
(\code{"undesirable"}) effect. For \code{small.values = "desirable"}, OR < 1,
RR < 1, HR < 1, or RD > 0 indicate that the new treatment is beneficial.
In this case, calculated risk differences are expressed as absolute risk
reductions (ARR). If OR > 1, RR > 1, HR > 1, or RD > 0, calculated risk
differences are expressed as absolute risk increases (ARI). For
\code{small.values = "undesirable"}, odds, OR > 1, RR > 1, HR > 1, or RD > 0
indicate that the new treatment is beneficial. In this case, calculated risk
differences are expressed as absolute benefit increases (ABI). If OR < 1,
RR < 1, HR < 1, or RD < 0, calculated risk differences are expressed as
absolute benefit reductions (ABR).

Argument \code{pscale} can be used to rescale ARRs, ..., ABRs, e.g.,
\code{pscale = 1000} means that these quantities are expressed as events
per 1000 observations. This is useful in situations with (very) low
event probabilities.
}
\examples{
# Calculate ARRs for risk differences of -0.12 and -0.22
rd(c(-0.12, -0.22), sm = "RD")

# Calculate ARR for risk ratio of 0.92 and baseline risk of 0.3
rd(0.92, p.c = 0.3, sm = "RR")

# Calculate ARR for odds ratio of 0.73 and baseline risk of 0.3
rd(0.73, p.c = 0.3, sm = "OR")

# Calculate ARRs for Mantel-Haenszel odds ratio
data(Olkin1995)
ma <-
  metabin(ev.exp, n.exp, ev.cont, n.cont, data = Olkin1995, random = FALSE)
rd(ma)

# Calculate ARRs from hazard ratio at two and four years (example from
# Altman & Andersen, 1999). Note, argument 'p.c' must provide survival
# probabilities instead of mortality rates for the control group.
rd(0.72, lower = 0.55, upper = 0.92, sm = "HR", p.c = 1 - c(0.33, 0.49))

}
\references{
Altman DG, Andersen PK (1999):
Calculating the number needed to treat for trials where the outcome
is time to an event.
\emph{British Medical Journal},
\bold{319}, 1492--95
}
\seealso{
\code{\link{metabin}}, \code{\link{metagen}}
}
\author{
Guido Schwarzer \email{guido.schwarzer@uniklinik-freiburg.de}
}
