Skip to contents

This function plots a transition network analysis (TNA) model using the qgraph package. The nodes in the graph represent states, with node sizes corresponding to initial state probabilities. Edge labels represent the edge weights of the network.

Usage

# S3 method for class 'tna'
plot(
  x,
  labels,
  colors,
  pie,
  show_pruned = TRUE,
  pruned_edge_color = "red",
  edge.color = NA,
  edge.labels = TRUE,
  edge.label.position = 0.65,
  layout = "circle",
  layout_args = list(),
  mar = rep(5, 4),
  theme = "colorblind",
  ...
)

Arguments

x

A tna object from tna().

labels

See qgraph::qgraph().

colors

See qgraph::qgraph().

pie

See qgraph::qgraph().

show_pruned

A logical value indicating if pruned edges removed by prune() should be shown in the plot. The default is TRUE, and the edges are drawn as dashed with a different color to distinguish them.

pruned_edge_color

A character string for the color to use for pruned edges when show_pruned = TRUE. The default is "red".

edge.color

See qgraph::qgraph().

edge.labels

See qgraph::qgraph().

edge.label.position

See qgraph::qgraph().

layout

One of the following:

  • A character string describing a qgraph layout.

  • A matrix of node positions to use, with a row for each node and x and y columns for the node positions.

  • A layout function from igraph.

layout_args

A list of arguments to pass to the igraph layout function when layout is a function.

mar

See qgraph::qgraph().

theme

See qgraph::qgraph().

...

Additional arguments passed to qgraph::qgraph().

Value

A qgraph plot of the transition network.

Examples

model <- tna(group_regulation)
plot(model)