admg <- cgraph(L %-->% X, X %-->% Y, L %-->% Y, class = "ADMG")
is_valid_adjustment(admg, "X", "Y") # L --> Y not blocked
#> [1] FALSE
is_valid_adjustment(admg, "X", "Y", "L")
#> [1] TRUE

Validate an adjustment set
Source: R/identification.R
Description
Tests the Generalized Adjustment Criterion, which covers DAGs, ADMGs, PDAG-family graphs, MAG-family graphs, and PAGs alike. given must contain no forbidden node (a descendant of a proper causal node between x and y, or x itself), and must m-separate x from y in the proper backdoor graph.
Usage
is_valid_adjustment(cg, x, y, given = character())Arguments
cg
|
A DAG, ADMG, PDAG-family (PDAG, CPDAG, MPDAG), AG-family (AG, MAG), or PAG graph created with cgraph().
|
x, y
|
Exposure and outcome node name, or character vector of node names. |
given
|
Character vector of adjustment node names (may be empty). |
Value
TRUE if given satisfies the adjustment criterion for identifying the causal effect of x on y.
References
Perković E, Textor J, Kalisch M, Maathuis MH (2018). “Complete Graphical Characterization and Construction of Adjustment Sets in Markov Equivalence Classes of Ancestral Graphs.” Journal of Machine Learning Research, 18, 1–62.