| moralize | R Documentation |
Moralizing a DAG involves connecting all parents of each node and then converting all directed edges into undirected edges.
moralize(cg)
cg |
A |
This changes the graph from a Directed Acyclic Graph (DAG) to an Undirected Graph (UG), also known as a Markov Graph.
A caugi object representing the moralized graph (UG).
Other operations:
condition_marginalize(),
count_dags(),
dag_from_pdag(),
enumerate_dags(),
exogenize(),
latent_project(),
meek_closure(),
mutate_caugi(),
normalize_latent_structure(),
skeleton()
cg <- caugi(A %-->% C, B %-->% C, class = "DAG")
moralize(cg) # A -- B, A -- C, B -- C
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.