admg <- cgraph(L %-->% X, X %-->% Y, L %-->% Y, class = "ADMG")
all_adjustment_sets(admg, "X", "Y")
#> [[1]]
#> [1] "L"

Enumerate all valid adjustment sets
Source: R/identification.R
Description
Lists all sets (up to size max_size) satisfying the Generalized Adjustment Criterion; see is_valid_adjustment(). When minimal = TRUE (default), only inclusion-minimal sets are returned.
Usage
all_adjustment_sets(
cg,
x,
y,
minimal = TRUE,
max_size = 3,
include = character(),
restrict = NULL
)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. |
minimal
|
If TRUE (default), return only minimal sets.
|
max_size
|
Maximum adjustment set size to consider. |
include
|
Character vector of nodes forced into every set. |
restrict
|
Character vector of candidate nodes sets are drawn from. NULL (default) allows every node except x and y.
|
Value
List of character vectors (empty list if none exist).