Learn R Programming

netmeta (version 3.2-0)

netleague: 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 = x$backtransf,
  direct,
  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,
  details = gs("details"),
  warn.deprecated = gs("warn.deprecated"),
  ...
)

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

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.

Arguments

x

An object of created with netmeta, netcomb, discomb, or netleague (mandatory).

y

An object of class netmeta, netcomb, or discomb (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 tables with network estimates or estimates from direct comparisons should be shown if (i) argument y is provided and the input for arguments x and y was created with netmeta or (ii) input for argument x was created with netmeta or netcomb.

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.

details

A logical specifying whether details on rows and columns should be printed.

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 in the lower triangle and the direct treatment estimates from pairwise comparisons in the upper triangle, if the input for argument x was created with netmeta;

  • the network estimates from the component network meta-analysis in the lower triangle, if the input for argument x was created with netcomb, and, in the upper triangle, (i) the network estimates from the network meta-analysis, if argument direct = FALSE, or (ii)) the direct treatment estimates from pairwise comparisons, if argument direct = TRUE;

  • the network estimates from the component network meta-analysis in the lower and upper triangle, if the input for argument x was created with discomb.

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 (component) network meta-analysis object x in the lower triangle and from (component) 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. If argument direct = TRUE, direct estimates are shown both in the lower and upper triangle if the input for arguments x and y was created with netmeta.

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 (component) 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).

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, netcomb, discomb, netposet, netrank, dat.woods2010, dat.linde2015

Examples

Run this code
# Network meta-analysis of count mortality statistics
#
pw0 <- pairwise(treatment, event = r, n = N,
  studlab = author, data = dat.woods2010, sm = "OR",
  reference.group = "Placebo")
net0 <- netmeta(pw0)

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

# \donttest{
# 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)

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

# Define order of treatments in depression dataset dat.linde2015
#
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
#
pw1 <- pairwise(treat = list(treatment1, treatment2, treatment3),
  event = list(resp1, resp2, resp3), n = list(n1, n2, n3),
  studlab = id, data = dat.linde2015, sm = "OR")
#
net1 <- netmeta(pw1, common = FALSE,
  seq = trts, ref = "Placebo", small = "undesirable")

# (2) Early remission
#
pw2 <- pairwise(treat = list(treatment1, treatment2, treatment3),
  event = list(remi1, remi2, remi3), n = list(n1, n2, n3),
  studlab = id, data = dat.linde2015, sm = "OR")
#
net2 <- netmeta(pw2, 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)

netrank(net1)
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)

Run the code above in your browser using DataLab