nma.networkplot {pcnetmeta}R Documentation

Plotting Treatment Network

Description

Visualizes the network of treatment comparisons.

Usage

nma.networkplot(s.id, t.id, n, data, title = "", title.cex = 1, trtname,
                alphabetic = TRUE, multi.show = FALSE, multi.col,
                weight.edge = TRUE, adjust.thick = 5, weight.node = TRUE,
                weight.node.ss = FALSE, adjust.node.size = 10,
                node.col = "gray", edge.col = "black", text.cex = 1,
                adjust.figsizex = 1.1, adjust.figsizey = 1.1)

Arguments

s.id

a numeric or character vector specifying study ID, or the corresponding column name in the argument data.

t.id

a numeric or character vector specifying treatment ID, or the corresponding column name in the argument data.

n

a numeric or character vector specifying sample size, or the corresponding column name in the argument data. It is used only when the node size is proportional to the total sample size of the corresponding treatment (weight.node.ss = TRUE).

data

an optional data frame containing the dataset of the network meta-analysis. If data is specified, the previous arguments, s.id, t.id, and n, should be specified as the corresponding column names in data; otherwise, the previous arguments use environment variables.

title

a character string indicating the plot title.

title.cex

the size of the plot title.

trtname

a vector of character strings specifying the treatment names for the corresponding treatment IDs according to their order in t.id. If not specified, t.id is used as treatment names.

alphabetic

a logical value indicating whether to sort treatment nodes alphabetically in the network plot. The default is TRUE. If FALSE, treatment nodes are sorted by the treatment IDs specified in t.id.

multi.show

a logical value indicating whether to show multi-arm studies (if any). Multi-arm studies with different treatment sets are visualized by shaded treatment loops in different colors.

multi.col

an optional vector of colors for visualizing multi-arm studies.

weight.edge

a logical value indicating whether to draw the edges proportionally to the number of direct treatment comparisons. The default is TRUE.

adjust.thick

a positive integer specifying the maximum thickness of the edge when weight is TRUE. The default is 5.

weight.node

a logical value indicating whether the node size is weighted by the total sample size or the total number of direct treatment comparisons of the corresponding treatment (TRUE, the default) or all treatment nodes have equal sizes (FALSE).

weight.node.ss

a logical value indicating whether the node size is proportional to the total sample size (TRUE) or the total number of direct treatment comparisons (FALSE, the default) of the corresponding treatment.

adjust.node.size

a positive number to adjust the node sizes when weight.node is TRUE. The default is 10.

node.col

a character string specifying the color of treatment nodes. The default is "gray".

edge.col

a character string specifying the color of edges between treatments nodes. The default is "black".

text.cex

a positive integer specifying the sizes of treatment names placed around/on the corresponding nodes. The default is 1.

adjust.figsizex

a positive number used to adjust the plot width. The default is 1.1.

adjust.figsizey

a positive number used to adjust the plot height. The default is 1.1.

Value

A network plot is generated. Each node represents a treatment, and the edges indicate the direct comparisons between the two treatments.

References

Lin L, Zhang J, Hodges JS, Chu H (2017). "Performing arm-based network meta-analysis in R with the pcnetmeta package." Journal of Statistical Software, 80(5), 1–25. <doi: 10.18637/jss.v080.i05>

Examples

data("smoke")
# NC: No contact; SH: Self-help
# IC: individual counseling; GC: group counseling
nma.networkplot(s.id, t.id, data = smoke, title = "Smoke Cessation",
  trtname = c("NC", "SH", "IC", "GC"))
nma.networkplot(s.id, t.id, n, data = smoke, title = "Smoke Cessation",
  trtname = c("NC", "SH", "IC", "GC"),
  weight.node.ss = TRUE, multi.show = TRUE)

data("diabetes")
nma.networkplot(s.id, t.id, data = diabetes, title = "Diabetes",
  trtname = c("Diuretic", "Placebo", "b-blocker", "CCB", "ACE inhibitor",
  "ARB"))
nma.networkplot(s.id, t.id, data = diabetes, title = "Diabetes",
  trtname = c("Diuretic", "Placebo", "b-blocker", "CCB", "ACE inhibitor",
  "ARB"), multi.show = TRUE)
nma.networkplot(s.id, t.id, n, data = diabetes, title = "",
  weight.node.ss = TRUE, multi.show = TRUE)
mtext(text = "Diabetes", side = 3, line = 0, font = 1, cex = 2)

[Package pcnetmeta version 2.8 Index]