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 |
t.id |
a numeric or character vector specifying treatment ID, or the corresponding column name in the argument |
n |
a numeric or character vector specifying sample size, or the corresponding column name in the argument |
data |
an optional data frame containing the dataset of the network meta-analysis. If |
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 |
alphabetic |
a logical value indicating whether to sort treatment nodes alphabetically in the network plot. The default is |
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 |
adjust.thick |
a positive integer specifying the maximum thickness of the edge when |
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 ( |
weight.node.ss |
a logical value indicating whether the node size is proportional to the total sample size ( |
adjust.node.size |
a positive number to adjust the node sizes when |
node.col |
a character string specifying the color of treatment nodes. The default is |
edge.col |
a character string specifying the color of edges between treatments nodes. The default is |
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)