Learn R Programming

caugi (version 1.0.0)

moralize: Moralize a DAG

Description

Moralizing a DAG involves connecting all parents of each node and then converting all directed edges into undirected edges.

Usage

moralize(cg)

Value

A caugi object representing the moralized graph (UG).

Arguments

cg

A caugi object (DAG).

Details

This changes the graph from a Directed Acyclic Graph (DAG) to an Undirected Graph (UG), also known as a Markov Graph.

See Also

Other operations: condition_marginalize(), exogenize(), latent_project(), mutate_caugi(), skeleton()

Examples

Run this code
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