netmeta (version 1.2-1)

netleague: Create and print league table for 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,
  comb.fixed = x$comb.fixed,
  comb.random = x$comb.random,
  seq = x$seq,
  ci = TRUE,
  backtransf = TRUE,
  direct = FALSE,
  digits = gs("digits"),
  bracket = gs("CIbracket"),
  separator = gs("CIseparator"),
  text.NA = ".",
  big.mark = gs("big.mark")
)

# S3 method for netleague print(x, comb.fixed = x$comb.fixed, comb.random = x$comb.random, ...)

Arguments

x

An object of class netmeta or netleague (mandatory).

y

An object of class netmeta (optional).

comb.fixed

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

comb.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.

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.

text.NA

A character string to label missing values.

big.mark

A character used as thousands separator.

Additional arguments (ignored at the moment).

Details

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.

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.

This implementation reports pairwise comparisons of the treatment in the row versus the treatment in the column in the lower triangle and column versus row 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).

See Also

netmeta, netposet, netrank

Examples

Run this code
# NOT RUN {
# 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 fixed and random effects model with
# - network estimates in lower triangle
# - direct estimates in upper triangle
#
netleague(net0, digits = 2, bracket = "(", separator = " - ")

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

# Change order of treatments according to treatment ranking (random
# effects model)
#
netleague(net0, comb.fixed = FALSE, digits = 2,
          seq = netrank(net0))
#
print(netrank(net0), comb.fixed = 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 (using R package WriteXLS
# which requires Perl https://www.perl.org/)
#
library(WriteXLS)
#
# League table from random effects model
#
WriteXLS(league0$random, ExcelFileName = "league0-random.xls",
         SheetNames = "leaguetable (random)", col.names = FALSE)
#
# League tables from fixed and random effects models
#
WriteXLS(list(league0$fixed, league0$random),
         ExcelFileName = "league0-both.xls",
         SheetNames = c("leaguetable (fixed)", "leaguetable (random)"),
         col.names = FALSE)

# 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, comb.fixed = FALSE,
                seq = trts, ref = "Placebo")

# (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, comb.fixed = FALSE,
                seq = trts, ref = "Placebo")

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, small = "bad"), ci = FALSE)
netleague(net1, net2, seq = netrank(net2, small = "bad"), ci = FALSE)

print(netrank(net1, small = "bad"))
print(netrank(net2, small = "bad"))


# Report results for network meta-analysis twice
#
netleague(net1, net1, seq = netrank(net1, small = "bad"), ci = FALSE,
          backtransf = FALSE)
netleague(net1, net1, seq = netrank(net1, small = "bad"), ci = FALSE,
          backtransf = FALSE, direct = TRUE)
# }
# NOT RUN {
options(oldopts)

# }
# NOT RUN {
# Generate a partial order of treatment rankings 
#
np <- netposet(net1, net2, outcomes = outcomes, small.values = rep("bad",2))
hasse(np)
plot(np)
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab