Moralizing a DAG involves connecting all parents of each node and then
converting all directed edges into undirected edges.
Arguments
- cg
A caugi object (DAG).
Value
A caugi object representing the moralized graph (UG).
Details
This changes the graph from a Directed Acyclic Graph (DAG) to an
Undirected Graph (UG), also known as a Markov Graph.
Examples
cg <- caugi(A %-->% C, B %-->% C, class = "DAG")
moralize(cg) # A -- B, A -- C, B -- C
#> <caugi object; 3 nodes, 3 edges; simple: TRUE; session=0x555e33c93570>
#> graph_class: UG
#> nodes: A, B, C
#> edges: A---B, A---C, B---C