plot.graph {GGMnonreg}R Documentation

Network Plot for graph Objects

Description

Visualize the conditional (in)dependence structure.

Usage

## S3 method for class 'graph'
plot(
  x,
  layout = "circle",
  neg_col = "#D55E00",
  pos_col = "#009E73",
  edge_magnify = 1,
  node_size = 10,
  palette = 2,
  node_names = NULL,
  node_groups = NULL,
  ...
)

Arguments

x

An object of class graph obtained from get_graph.

layout

Character string. Which graph layout (defaults is circle) ? See gplot.layout.

neg_col

Character string. Color for the positive edges (defaults to a colorblind friendly red).

pos_col

Character string. Color for the negative edges (defaults to a colorblind friendly green).

edge_magnify

Numeric. A value that is multiplied by the edge weights. This increases (> 1) or decreases (< 1) the line widths (defaults to 1).

node_size

Numeric. The size of the nodes (defaults to 10).

palette

A character string sepcifying the palette for the groups. (default is Set3). See palette options here.

node_names

Character string. Names for nodes of length p.

node_groups

A character string of length p (the number of nodes in the model). This indicates groups of nodes that should be the same color (e.g., "clusters" or "communities").

...

Currently ignored.

Value

An object of class ggplot

Examples

# data
Y <- ptsd

# estimate graph
fit <- ggm_inference(Y, boot = FALSE)

# get info for plotting
plot(get_graph(fit))

[Package GGMnonreg version 1.0.0 Index]