nma.networkplot: Plotting the Network

Description Usage Arguments Value References Examples

View source: R/nma.networkplot.R

Description

nma.networkplot plots a visual network presenting treatment comparisons.

Usage

1
2
3
4
5
nma.networkplot(s.id, t.id, data, title = "", trtname, alphabetic = TRUE,
                weight.edge = TRUE, adjust.thick = 5,
                weight.node = TRUE, adjust.node.size = 10,
                node.col = "orange", edge.col = "black", text.cex = 1,
                adjust.figsizex = 1.1, adjust.figsizey = 1.1)

Arguments

s.id

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

t.id

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

data

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

title

a character string indicating plot title.

trtname

a vector of character strings indicating the treatment names for the corresponding treatment IDs according 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.

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 indicating the maximum thickness of the edge when weight is TRUE. The default is 5.

weight.node

a logical value indicating whether node size is proportional to the number of direct treatment comparisons which include that node. The default is TRUE.

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 indicating the color of treatment nodes. The default is "orange".

edge.col

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

text.cex

a positive integer indicating 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 in various studies.

References

Lin L, Zhang J, Hodges JS, and Chu H (2017). "pcnetmeta: An R package for arm-based network meta-analysis." J Stat Softw, 80(5), 1–25.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
data(smoke)
nma.networkplot(s.id, t.id, data = smoke, title = "Smoke Cessation",
  trtname = c("NC", "SH", "IC", "GC"))
# NC: No contact; SH: Self-help
# IC: individual counselling; GC: group counselling

data(diabetes)
nma.networkplot(s.id, t.id, data = diabetes, title = "Diabetes",
  trtname = c("Diuretic", "Placebo", "b-blocker", "CCB", "ACE inhibitor",
  "ARB"))

Example output

Loading required package: rjags
Loading required package: coda
Linked to JAGS 4.2.0
Loaded modules: basemod,bugs

pcnetmeta documentation built on Nov. 17, 2017, 5:04 a.m.