nnt: Calculate the number needed to treat (NNT)

Description Usage Arguments Details Author(s) References See Also Examples

View source: R/nnt.R

Description

Calculate the number needed to treat (NNT) from estimated risk difference, risk ratio, or odds ratio, and a baseline risk.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
nnt(x, ...)

## S3 method for class 'meta'
nnt(x, p.c, comb.fixed = x$comb.fixed, comb.random = x$comb.random, ...)

## Default S3 method:
nnt(x, p.c, sm, lower, upper, ...)

## S3 method for class 'nnt.meta'
print(
  x,
  comb.fixed = x$comb.fixed,
  comb.random = x$comb.random,
  digits = gs("digits"),
  digits.prop = gs("digits.prop"),
  big.mark = gs("big.mark"),
  ...
)

Arguments

x

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

...

Additional arguments (ignored at the moment).

p.c

Baseline risk (control group event probability).

comb.fixed

A logical indicating whether NNTs should be calculated based on fixed effect estimate.

comb.random

A logical indicating whether NNTs should be calculated based on random effects estimate.

sm

Summary measure.

lower

Lower confidence interval limit.

upper

Upper confidence interval limit.

digits

Minimal number of significant digits, see print.default.

digits.prop

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

big.mark

A character used as thousands separator.

Details

The number needed to treat (NNT) can be easily computed from an estimated risk difference (RD), risk ratio (RR), or odds ratio (OR) and a given baseline risk (Higgins & Green, 2011, section 12.5).

Accordlingly, this function can be used to calculate NNTs for meta-analyses generated with metabin or metagen if argument sm was equal to "RD", "RR", or "OR". It is also possible to directly provide estimated treatment effects without conducting a meta-analysis (see Examples).

The baseline risk 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; otherwise the control event probabilities 0.1, 0.2, ..., 0.9 are used.

Author(s)

Guido Schwarzer sc@imbi.uni-freiburg.de

References

Higgins, J.P.T and S. Green (2011): Cochrane Handbook for Systematic Reviews of Interventions Version 5.1.0 [Updated March 2011]. The Cochrane Library: http://www.cochrane-handbook.org

See Also

metabin, metagen

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
# Calculate NNT for RD = -0.21
# (Cochrane Handbook, version 5.1, subsection 12.5.4.1)
nnt(-0.21, sm = "RD")

# Calculate NNT for RR = 0.92 and baseline risk p.c = 0.3
# (Cochrane Handbook, version 5.1, subsection 12.5.4.2)
nnt(0.92, p.c = 0.3, sm = "RR")

# Calculate NNT for OR = 0.73 and baseline risk p.c = 0.3
# (Cochrane Handbook, version 5.1, subsection 12.5.4.3)
nnt(0.73, p.c = 0.3, sm = "OR")

# Use Mantel-Haenszel odds ratio to calculate NNTs
data(Olkin1995)
m1 <- metabin(ev.exp, n.exp, ev.cont, n.cont, data = Olkin1995,
              comb.random = FALSE)
nnt(m1, comb.random = TRUE)

meta documentation built on Sept. 14, 2021, 5:14 p.m.