f.reachable_closure: Reachable closure of a set of vertices in a graph.

View source: R/graph-functions.R

f.reachable_closureR Documentation

Reachable closure of a set of vertices in a graph.

Description

Function to return the reachable closure of a set of vertices in a graph object. First obtain a Conditional ADMG (CADMG) via recursively fixing as many vertices as possible in the set of all vertices (V) excluding the set of vertices specified by the nodes parameter (S), i.e. V \ S. The reachable closure is the subset of V \ S, where each vertex is not fixable even upon fixing other vertices.

Usage

f.reachable_closure(graph, nodes)

Arguments

graph

A graph object generated by the make.graph() function.

nodes

A character vector of vertices.

Value

A list containing the following components:

reachable_closure

A character vector containing the reachable closure of the given vertices.

fixing_order

A character vector of vertices telling the order in which the vertices were fixed.

graph

The CADMG obtained via recursively fixing as many vertices as possible in the set of all vertices (V) excluding the set of vertices specified by the nodes parameter (S), i.e. V \ S.

Examples

graph <- make.graph(vertices=c('A','M','L','Y','X'),
bi_edges=list(c('A','Y')),
di_edges=list(c('X','A'), c('X','M'), c('X','L'),
c('X','Y'), c('M','Y'), c('A','M'), c('A','L'), c('M','L'), c('L','Y')))
f.reachable_closure(graph, 'A')


flexCausal documentation built on March 29, 2026, 5:08 p.m.