

Condition and marginalize a graph
Source: R/transform.R
Description
Removes given and index from cg, returning the AG over the remaining nodes that represents the graphical effect of conditioning on given and marginalizing out index. At least one of the two must be non-empty, and they must be disjoint.
Usage
condition_marginalize(cg, given = character(), index = character())Arguments
cg
|
A DAG, ADMG, or AG-family (AG, MAG) graph created with cgraph().
|
given
|
Character vector of node names to condition on. |
index
|
Character vector of node names to marginalize out. |
Value
A cgraph of class AG.