Ancestor Graph
Creates the induced subgraph containing only the vertices
in v
, their ancestors, and the edges between them. All
other vertices and edges are discarded.
ancestorGraph(x, v = NULL)
x |
the input graph, a DAG, MAG, or PDAG. |
v |
variable names. |
If the input graph is a MAG or PDAG, then all *possible* ancestors will be returned (see Examples).
g <- dagitty("dag{ z <- x -> y }") ancestorGraph( g, "z" ) g <- dagitty("pdag{ z -- x -> y }") ancestorGraph( g, "y" ) # includes z
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.