activate_collider_paths | R Documentation |
Stratifying on colliders can open biasing pathways between variables.
activate_collider_paths
activates any such pathways given a variable
or set of variables to adjust for and adds them to the tidy_dagitty
.
activate_collider_paths(.tdy_dag, adjust_for, ...)
.tdy_dag |
input graph, an object of class |
adjust_for |
a character vector, the variable(s) to adjust for. |
... |
additional arguments passed to |
a tidy_dagitty
with additional rows for collider-activated
pathways
control_for()
, ggdag_adjust()
,
geom_dag_collider_edges()
dag <- dagify(m ~ x + y, x ~ y)
collided_dag <- activate_collider_paths(dag, adjust_for = "m")
collided_dag
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.