rd: Calculate the risk difference from meta-analysis results

View source: R/rd.R

rdR Documentation

Calculate the risk difference from meta-analysis results

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.

Usage

rd(x, ...)

## S3 method for class 'meta'
rd(
  x,
  p.c,
  common = x$common,
  random = x$random,
  small.values = "desirable",
  pscale = 1,
  ...
)

## Default S3 method:
rd(
  x,
  p.c,
  sm,
  lower,
  upper,
  level = gs("level.ma"),
  small.values = "desirable",
  pscale = 1,
  transf = FALSE,
  ...
)

## S3 method for class 'rd.meta'
print(
  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"),
  ...
)

## S3 method for class 'rd.default'
print(
  x,
  pscale = attributes(x)$pscale,
  digits = gs("digits"),
  digits.prop = gs("digits.prop"),
  big.mark = gs("big.mark"),
  ...
)

Arguments

x

An object of class meta, or estimated treatment effect(s), i.e., risk difference(s), risk ratio(s), odds ratio(s), or hazard ratio(s).

...

Additional arguments (ignored)

p.c

Baseline probability, i.e., control group event probability for binary outcomes or survival probability in control group for hazard ratios.

common

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

random

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

small.values

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

pscale

A numeric defining a scaling factor for printing of absolute risk reduction or absolute benefit increase.

sm

Summary measure.

lower

Lower confidence interval limit.

upper

Upper confidence interval limit.

level

The level used to calculate confidence intervals.

transf

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

digits

Minimal number of significant digits to print ARR / ABI and its confidence interval, see print.default.

digits.prop

Minimal number of significant digits for proportions, see print.default.

big.mark

A character used as thousands separator.

details

A logical specifying whether details should be printed.

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 metabin or metagen if argument sm was equal to "RD", "RR", "OR", or "HR". It is also possible to provide only estimated treatment effects and baseline probabilities (see Examples).

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

Argument small.values can be used to specify whether small treatment effects indicate a beneficial ("desirable") or harmful ("undesirable") effect. For 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 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 pscale can be used to rescale ARRs, ..., ABRs, e.g., pscale = 1000 means that these quantities are expressed as events per 1000 observations. This is useful in situations with (very) low event probabilities.

Author(s)

Guido Schwarzer guido.schwarzer@uniklinik-freiburg.de

References

Altman DG, Andersen PK (1999): Calculating the number needed to treat for trials where the outcome is time to an event. British Medical Journal, 319, 1492–95

See Also

metabin, metagen

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))


meta documentation built on April 2, 2026, 5:07 p.m.