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.
plotDAG(
DAG,
tmax = NULL,
xjitter,
yjitter,
node.action.color,
vertex_attrs = list(),
edge_attrs = list(),
excludeattrs,
customvlabs,
verbose = getOption("simcausal.verbose")
)
A DAG object that was specified by calling set.DAG
Maximum time-point to plot for time-varying DAG objects
Amount of random jitter for node x-axis plotting coordinates
Amount of random jitter for node y-axis plotting coordinates
Color of the action node labels (only for action DAG of class DAG.action). If missing, defaults to red.
A named list of igraph
graphical parameters for plotting DAG vertices. These parameters are passed on to add.vertices
igraph
function.
A named list of igraph
graphical parameters for plotting DAG edges. These parameters are passed on to add.edges
igraph
function.
A character vector for DAG nodes that should be excluded from the plot
A named vector of custom DAG node labels (replaces node names from the DAG object).
Set to TRUE
to print messages on status and information to the console.
Turn this off by default using options(simcausal.verbose=FALSE).
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.