netleague: Create league table with network meta-analysis results

View source: R/netleague.R

netleagueR Documentation

Create league table with network meta-analysis results

Description

A league table is a square matrix showing all pairwise comparisons in a network meta-analysis. Typically, both treatment estimates and confidence intervals are shown.

Usage

netleague(
  x,
  y,
  common = x$common,
  random = x$random,
  seq = x$seq,
  ci = TRUE,
  backtransf = TRUE,
  direct = FALSE,
  digits = gs("digits"),
  big.mark = gs("big.mark"),
  text.NA = ".",
  bracket = gs("CIbracket"),
  separator = gs("CIseparator"),
  lower.blank = gs("CIlower.blank"),
  upper.blank = gs("CIupper.blank"),
  writexl = !missing(path),
  path = "leaguetable.xlsx",
  overwrite = FALSE,
  warn.deprecated = gs("warn.deprecated"),
  ...
)

## S3 method for class 'netleague'
print(
  x,
  common = x$x$common,
  random = x$x$random,
  warn.deprecated = gs("warn.deprecated"),
  ...
)

Arguments

x

An object of class netmeta or netleague (mandatory).

y

An object of class netmeta (optional).

common

A logical indicating whether a league table should be printed for the common effects network meta-analysis.

random

A logical indicating whether a league table should be printed for the random effects network meta-analysis.

seq

A character or numerical vector specifying the sequence of treatments in rows and columns of a league table.

ci

A logical indicating whether confidence intervals should be shown.

backtransf

A logical indicating whether printed results should be back transformed. If backtransf = TRUE, results for sm = "OR" are printed as odds ratios rather than log odds ratios, for example.

direct

A logical indicating whether league table with network estimates (default) or estimates from direct comparisons should be generated if argument y is not missing.

digits

Minimal number of significant digits, see print.default.

big.mark

A character used as thousands separator.

text.NA

A character string to label missing values.

bracket

A character with bracket symbol to print lower confidence interval: "[", "(", "{", "".

separator

A character string with information on separator between lower and upper confidence interval.

lower.blank

A logical indicating whether blanks between left bracket and lower confidence limit should be printed.

upper.blank

A logical indicating whether blanks between separator and upper confidence limit should be printed.

writexl

A logical indicating whether an Excel file should be created (R package writexl must be available).

path

A character string specifying the filename of the Excel file.

overwrite

A logical indicating whether an existing Excel file should be overwritten.

warn.deprecated

A logical indicating whether warnings should be printed if deprecated arguments are used.

...

Additional arguments (passed on to write_xlsx to create Excel file).

Details

A league table is a square matrix showing all pairwise comparisons in a network meta-analysis (Hutton et al., 2015). Typically, both treatment estimates and confidence intervals are shown.

If argument y is not provided, the league table contains the network estimates from network meta-analysis object x in the lower triangle and the direct treatment estimates from pairwise comparisons in the upper triangle. Note, for the random-effects model, the direct treatment estimates are based on the common between-study variance \tau^2 from the network meta-analysis, i.e. the square of list element x$tau.

If argument y is provided, the league table contains information on treatment comparisons from network meta-analysis object x in the lower triangle and from network meta-analysis object y in the upper triangle. This is, for example, useful to print information on efficacy and safety in the same league table.

By default, an R object with the league tables is generated. Alternatively, an Excel file is created if argument writexl = TRUE.

This implementation reports pairwise comparisons of the treatment in the column versus the treatment in the row in the lower triangle and row versus column in the upper triangle. This is a common presentation for network meta-analyses which allows to easily compare direction and magnitude of treatment effects. For example, given treatments A, B, and C, the results reported in the first row and second column as well as second row and first column are from the pairwise comparison A versus B. Note, this presentation is different from the printout of a network meta-analysis object which reports opposite pairwise comparisons in the lower and upper triangle, e.g., A versus B in the first row and second column and B versus A in the second row and first column.

If the same network meta-analysis object is used for arguments x and y, reciprocal treatment estimates will be shown in the upper triangle (see examples), e.g., the comparison B versus A.

R function netrank can be used to change the order of rows and columns in the league table (see examples).

Value

An object of class netleague with corresponding print function if writexl = FALSE. The object is a list containing the league tables in list elements 'common' and 'random'. An Excel file is created if writexl = TRUE. In this case, NULL is returned in R.

Author(s)

Guido Schwarzer guido.schwarzer@uniklinik-freiburg.de, Gerta Rücker gerta.ruecker@uniklinik-freiburg.de

References

Hutton B, Salanti G, Caldwell DM, et al. (2015): The PRISMA Extension Statement for Reporting of Systematic Reviews Incorporating Network Meta-analyses of Health Care Interventions: Checklist and Explanations. Annals of Internal Medicine, 162, 777

See Also

netmeta, netposet, netrank

Examples

# Network meta-analysis of count mortality statistics
#
data(Woods2010)

p0 <- pairwise(treatment, event = r, n = N,
  studlab = author, data = Woods2010, sm = "OR")
net0 <- netmeta(p0)

oldopts <- options(width = 100)

# League table for common and random effects model with
# - network estimates in lower triangle
# - direct estimates in upper triangle
#
netleague(net0, digits = 2, bracket = "(", separator = " - ")

# League table for common effects model
#
netleague(net0, random = FALSE, digits = 2)

# Change order of treatments according to treatment ranking (random
# effects model)
#
netleague(net0, common = FALSE, digits = 2, seq = netrank(net0))
#
print(netrank(net0), common = FALSE)

## Not run: 
# Create a CSV file with league table for random effects model
#
league0 <- netleague(net0, digits = 2, bracket = "(", separator = " to ")
#
write.table(league0$random, file = "league0-random.csv",
  row.names = FALSE, col.names = FALSE, sep = ",")
#
# Create Excel files with league tables
# (if R package writexl is available)
#
netleague(net0, digits = 2, bracket = "(", separator = " to ",
          path = tempfile(fileext = ".xlsx"))

## End(Not run)


# Use depression dataset
#
data(Linde2015)

# Define order of treatments
#
trts <- c("TCA", "SSRI", "SNRI", "NRI",
  "Low-dose SARI", "NaSSa", "rMAO-A", "Hypericum", "Placebo")

# Outcome labels
#
outcomes <- c("Early response", "Early remission")

# (1) Early response
#
p1 <- pairwise(treat = list(treatment1, treatment2, treatment3),
  event = list(resp1, resp2, resp3), n = list(n1, n2, n3),
  studlab = id, data = Linde2015, sm = "OR")
#
net1 <- netmeta(p1, common = FALSE,
                seq = trts, ref = "Placebo", small = "undesirable")

# (2) Early remission
#
p2 <- pairwise(treat = list(treatment1, treatment2, treatment3),
  event = list(remi1, remi2, remi3), n = list(n1, n2, n3),
  studlab = id, data = Linde2015, sm = "OR")
#
net2 <- netmeta(p2, common = FALSE,
                seq = trts, ref = "Placebo", small = "undesirable")

options(width = 200)
netleague(net1, digits = 2)

netleague(net1, digits = 2, ci = FALSE)
netleague(net2, digits = 2, ci = FALSE)

# League table for two outcomes with
# - network estimates of first outcome in lower triangle
# - network estimates of second outcome in upper triangle
#
netleague(net1, net2, digits = 2, ci = FALSE)

netleague(net1, net2, seq = netrank(net1), ci = FALSE)
netleague(net1, net2, seq = netrank(net2), ci = FALSE)

print(netrank(net1))
print(netrank(net2))


# Report results for network meta-analysis twice
#
netleague(net1, net1, seq = netrank(net1), ci = FALSE,
  backtransf = FALSE)
netleague(net1, net1, seq = netrank(net1), ci = FALSE,
  backtransf = FALSE, direct = TRUE)


options(oldopts)

## Not run: 
# Generate a partial order of treatment rankings 
#
np <- netposet(net1, net2, outcomes = outcomes)

# Requires R package 'hasse'
#
hasse(np)
plot(np)

## End(Not run)


netmeta documentation built on June 23, 2024, 9:06 a.m.