
flag bad controls (mediator/collider/desc of Y) among a candidate set
Source:R/compare.R
bad_controls_in.Rdflag bad controls (mediator/collider/desc of Y) among a candidate set
Value
A character vector (possibly empty) containing the elements of
controls that are identified as "bad controls".
This is essentially the inverse of pick_minimal_controls(), as it returns
bad controls, rather than the minimal/canonical set of good controls
Examples
# Which variables in a formula are bad controls, given the DAG?
bad_controls_in(toy_dag, controls = c("M", "C", "Z"))
#> [1] "M" "C"