plotDAG: Plot DAG

View source: R/simcausal.r

plotDAGR Documentation

Plot DAG

Description

Plot DAG object using functions from igraph package. The default setting is to keep the regular (observed) DAG nodes with shape set to "none", which can be over-ridden by the user. For latent (hidden) DAG nodes the default is to: 1) set the node color as grey; 2) enclose the node by a circle; and 3) all directed edges coming out of the latent node are plotted as dashed.

Usage

plotDAG(DAG, tmax = NULL, xjitter, yjitter, node.action.color,
  vertex_attrs = list(), edge_attrs = list(), excludeattrs,
  customvlabs, verbose = getOption("simcausal.verbose"))

Arguments

DAG

A DAG object that was specified by calling set.DAG

tmax

Maximum time-point to plot for time-varying DAG objects

xjitter

Amount of random jitter for node x-axis plotting coordinates

yjitter

Amount of random jitter for node y-axis plotting coordinates

node.action.color

Color of the action node labels (only for action DAG of class DAG.action). If missing, defaults to red.

vertex_attrs

A named list of igraph graphical parameters for plotting DAG vertices. These parameters are passed on to add.vertices igraph function.

edge_attrs

A named list of igraph graphical parameters for plotting DAG edges. These parameters are passed on to add.edges igraph function.

excludeattrs

A character vector for DAG nodes that should be excluded from the plot

customvlabs

A named vector of custom DAG node labels (replaces node names from the DAG object).

verbose

Set to TRUE to print messages on status and information to the console. Turn this off by default using options(simcausal.verbose=FALSE).

References

Sofrygin O, van der Laan MJ, Neugebauer R (2017). "simcausal R Package: Conducting Transparent and Reproducible Simulation Studies of Causal Effect Estimation with Complex Longitudinal Data." Journal of Statistical Software, 81(2), 1-47. doi: 10.18637/jss.v081.i02.


osofr/simcausal documentation built on Oct. 21, 2022, 3:09 a.m.