AncestralRelations {dagitty} | R Documentation |
Ancestral Relations
Description
Retrieve the names of all variables in a given graph that are in the specified
ancestral relationship to the input variable v
.
Usage
descendants(x, v, proper = FALSE)
ancestors(x, v, proper = FALSE)
children(x, v)
parents(x, v)
neighbours(x, v)
spouses(x, v)
adjacentNodes(x, v)
markovBlanket(x, v)
Arguments
x |
the input graph, of any type. |
v |
name(s) of variable(s). |
proper |
logical. By default (
By convention, |
Examples
g <- dagitty("graph{ a <-> x -> b ; c -- x <- d }")
# Includes "x"
descendants(g,"x")
# Does not include "x"
descendants(g,"x",TRUE)
parents(g,"x")
spouses(g,"x")