powered by
Moralizing a DAG involves connecting all parents of each node and then converting all directed edges into undirected edges.
moralize(cg)
A caugi object representing the moralized graph (UG).
caugi
A caugi object (DAG).
This changes the graph from a Directed Acyclic Graph (DAG) to an Undirected Graph (UG), also known as a Markov Graph.
Other operations: condition_marginalize(), exogenize(), latent_project(), mutate_caugi(), skeleton()
condition_marginalize()
exogenize()
latent_project()
mutate_caugi()
skeleton()
cg <- caugi(A %-->% C, B %-->% C, class = "DAG") moralize(cg) # A -- B, A -- C, B -- C
Run the code above in your browser using DataLab