Learn R Programming

SEMID (version 0.4.1)

ancestors: All ancestors of a collection of nodes

Description

Finds all the ancestors of a collection of nodes. These ancestors DO include the nodes themselves (every node is considered an ancestor of itself).

Usage

ancestors(this, nodes, ...)

# S3 method for LatentDigraphFixedOrder ancestors(this, nodes, includeObserved = T, includeLatents = T, ...)

# S3 method for LatentDigraph ancestors(this, nodes, includeObserved = T, includeLatents = T, ...)

# S3 method for MixedGraph ancestors(this, nodes, ...)

Value

the ancestors of the nodes in the observed part of the graph.

Arguments

this

the graph object

nodes

the nodes from which to find all ancestors

...

ignored.

includeObserved

if TRUE includes observed nodes in the returned set.

includeLatents

if TRUE includes latent nodes in the returned set.