Checks whether Z is a valid adjustment set for estimating
the causal effect of X on Y in an ADMG using the generalized adjustment
criterion.
Usage
is_valid_adjustment_admg(
cg,
X = NULL,
Y = NULL,
Z = NULL,
X_index = NULL,
Y_index = NULL,
Z_index = NULL
)
Arguments
- cg
A caugi object of class ADMG.
- X, Y
Node names (can be vectors for multiple treatments/outcomes).
- Z
Conditioning set (character vector of node names).
- X_index, Y_index, Z_index
Optional 1-based indices.
Value
Logical value indicating if the adjustment set is valid.
Examples
# Classic confounding
cg <- caugi(
L %-->% X,
X %-->% Y,
L %-->% Y,
class = "ADMG"
)
is_valid_adjustment_admg(cg, X = "X", Y = "Y", Z = NULL) # FALSE
#> [1] FALSE
is_valid_adjustment_admg(cg, X = "X", Y = "Y", Z = "L") # TRUE
#> [1] TRUE