Constructs different versions of the essential graph from a given DAG. External function that computes essential graph of a dag Minimal PDAG: The only directed edges are those who participate in v-structure Completed PDAG: very directed edge corresponds to a compelled edge, and every undirected edge corresponds to a reversible edge
Details
This function returns an essential graph from a DAG, aka acyclic partially directed graph (PDAG). This can be useful if the learning procedure is defined up to a Markov class of equivalence. A minimal PDAG is defined as only directed edges are those who participate in v-structure. Whereas the completed PDAG: every directed edge corresponds to a compelled edge, and every undirected edge corresponds to a reversible edge.
The dag
can be provided using a formula statement (similar to glm).
A typical formula is ~ node1|parent1:parent2 + node2:node3|parent3
.
The formula statement have to start with ~
.
In this example, node1 has two parents (parent1 and parent2).
node2 and node3 have the same parent3.
The parents names have to exactly match those given in node.names
.
:
is the separator between either children or parents,
|
separates children (left side) and parents (right side),
+
separates terms, .
replaces all the variables in node.names
.