dagitty (version 0.2-2)

moralize: Moral Graph

Description

Graph obtained from x by (1) “marrying” (inserting an undirected ede between) all nodes that have common children, and then replacing all edges by undirected edges. If x contains bidirected edges, then all sets of nodes connected by a path containing only bidirected edges are treated like a single node (see Examples).

Usage

moralize(x)

Arguments

x

the input graph, a DAG, MAG, or PDAG.

Examples

Run this code
# NOT RUN {
# returns a complete graph
moralize( "dag{ x->m<-y }" )
# also returns a complete graph
moralize( "dag{ x -> m1 <-> m2 <-> m3 <-> m4 <- y }" )

# }

Run the code above in your browser using DataLab