demo.dag0 to demo.dag6 functions for some example specifications.dag.init(outcome = NULL, exposure = NULL, covs = c(), arcs = c(),
assocs = c(), xgap = 0.04, ygap = 0.05, len = 0.1, y.name = NULL,
x.name = NULL, cov.names = c(), ...)dagRdag). Check out some of the demonstration DAGs for details.
The DAG is actually a list object, with elements
cov.types (the covs vector, with 0 put in front, and -1 at the end).;
x and y (coordinates for drawing the nodes, initially set up more or less in a half-circle above the x->y arc);
arc (the arcs, transformed into a matrix);
arc.type (the assocs vector);
curve.x and curve.y (if associations are featured, these provide the coordinates through which to curve);
xgap, ygap, len (the respective drawing parameters);
version (dagR version).dag.drawdemo.dag1;
demo.dag1();
demo.dag2;
demo.dag2();Run the code above in your browser using DataLab