moralize {dagitty} | R Documentation |
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
# returns a complete graph
moralize( "dag{ x->m<-y }" )
# also returns a complete graph
moralize( "dag{ x -> m1 <-> m2 <-> m3 <-> m4 <- y }" )
[Package dagitty version 0.3-4 Index]