Skip to contents

Draws a treatment network graph from the direct comparisons in a fitted network_meta object. Node size and edge width can be scaled by available direct evidence, similar to common network meta-analysis graph displays, without requiring graph plotting dependencies.

Usage

network_graph_plot(
  nma_object,
  main = "Treatment Network",
  node_size = c("studies", "effects", "equal"),
  edge_width = c("studies", "effects", "equal"),
  layout = c("circle"),
  node_cex_range = c(2, 7),
  edge_lwd_range = c(1, 8),
  node_col = "#9ECAE1",
  node_border = "#08519C",
  edge_col = "#4D4D4D",
  label_col = "#111111",
  label_cex = 0.9,
  edge_label = FALSE,
  edge_label_cex = 0.75,
  edge_label_col = "#333333",
  xlim = NULL,
  ylim = NULL,
  ...,
  strata = NULL,
  show_multiarm = FALSE,
  label_position = c("outside", "above", "below", "left", "right", "center"),
  label_offset = 0.06,
  edge_label_offset = 0.04,
  edge_label_bg = "white"
)

Arguments

nma_object

A fitted object returned by network_meta.

main

Plot title.

node_size

Counts unique studies containing a treatment for studies; effects counts supplied contrast rows involving that treatment. Scale nodes by "studies", "effects", or draw unweighted nodes with "equal".

edge_width

For studies, count unique studies containing both arms in a common outcome/time measurement. Implied multi-arm pairs are included. effects counts supplied pairwise rows (which can be zero). Scale edges by "studies", "effects", or draw unweighted edges with "equal".

layout

Currently "circle".

node_cex_range

Numeric length-2 range for scaled node sizes.

edge_lwd_range

Numeric length-2 range for scaled edge widths.

node_col

Node fill color.

node_border

Node border color.

edge_col

Edge color.

label_col

Treatment label color.

label_cex

Treatment label size.

edge_label

Logical; if TRUE, print edge weights near edge midpoints, moving slightly along edges when needed to avoid crossings.

edge_label_cex

Edge label size.

edge_label_col

Edge label color.

xlim, ylim

Optional plot limits.

...

Additional arguments passed to plot.

strata

Named list selecting fitted outcome/time values.

show_multiarm

Shade distinct multi-arm study designs.

label_position

Treatment label placement: outside (default) moves labels radially outside the circular network; above, below, left, right, or center place labels relative to each node.

label_offset

Additional gap beyond the node, in plot-coordinate units (the circular layout has radius one). Ignored for center.

edge_label_offset

Signed perpendicular gap between study counts and their edges, in plot-coordinate units. Use zero to keep counts on edges.

edge_label_bg

Background color behind study counts, drawn after all edges to keep lines from crossing text. Use NA for no background.

Value

Invisibly returns a list with nodes and edges data frames used for plotting. node_labels and edge_labels give the displayed label coordinates. Label placement changes only the display, not evidence counts or estimates.

Examples

# \donttest{
network_graph_plot(nma_fit)

# }