Skip to contents

Plot a Transition Network Model from a Matrix of Edge Weights

Usage

plot_model(
  x,
  labels,
  colors,
  edge.labels = TRUE,
  edge.label.position = 0.65,
  layout = "circle",
  layout_args = list(),
  mar = rep(5, 4),
  theme = "colorblind",
  ...
)

Arguments

x

A square matrix of edge weights.

labels

See qgraph::qgraph().

colors

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

See plot.tna().

Examples

m <- matrix(rexp(25), 5, 5)
plot_model(m)