Learn R Programming

PCBN (version 0.1.1)

dsep_set: D-separation of two nodes given a set in a DAG

Description

D-separation of two nodes given a set in a DAG

Usage

dsep_set(DAG, X, Y, Z = NULL)

Value

TRUE if the sets are d-separated and FALSE if not

Arguments

DAG

Directed Acyclic Graph

X

node

Y

node

Z

set

Examples

Run this code

DAG = create_empty_DAG(5)
DAG = bnlearn::set.arc(DAG, 'U1', 'U3')
DAG = bnlearn::set.arc(DAG, 'U2', 'U3')
DAG = bnlearn::set.arc(DAG, 'U1', 'U4')
DAG = bnlearn::set.arc(DAG, 'U2', 'U4')
DAG = bnlearn::set.arc(DAG, 'U3', 'U4')

dsep_set(DAG, 'U1', 'U5')

Run the code above in your browser using DataLab