Setup attributes of graph object for plotting directed acyclic graph with graph attributes
mvregmed.graph.attributes(fit.edges, x.color = "palegreen",
y.color = "palevioletred", med.color = "skyblue", v.size = 30)List with items 1) output from graph_from_edgelist (see igraph); 2) vertex names; 3)vertex size; 4) vertex colors
A data.frame of edges with 1st column a vertex directed to the vertex in the 2nd column. This is all.edge from the list that is output from mvregmed.edges
Color of vertices for x variables
Color of vertices for y variables
Color of vertices for mediators
Size of vertices for plotting
Daniel Schaid and Jason Sinnwell
User can use this as template for taking advantage of more igraph attributes.
Schaid DS, Dikilitas O, Sinnwell JP, Kullo I (2022). Penalized mediation models for multivariate data. Genet Epidemiol 46:32-50.
mvregmed.edges
graph_from_edgelist