dag.adjust {dagR} | R Documentation |
Adjust an existing DAG for covariables.
Description
Looks for associations introduced by adjusting for the covariables specified, then looks for biasing paths, and finally evaluates these paths.
Usage
dag.adjust(dag, A = c())
Arguments
dag |
The DAG to be adjusted (or evaluated). |
A |
Vector indicating the adjustment set. The numbering is according to the nodes vector of the DAG, which is shown e.g. in the legend of a DAG drawn by |
Details
If the adjustment set is empty, the function only looks for biasing paths and evalutes these.
Value
A DAG with the adjustment set A, and possibly with additional
associations introduced by adjustment, biasing paths found,
and the status of these.
If adjustment set is not empty, searchType
and searchRes
are set to NULL
.
Note
CAVE: Do not apply this to an already adjusted DAG, since
this might not be handled appropriately (see documentation
of dag.adjustment
called by dag.adjust
).
Author(s)
Lutz P Breitling <l.breitling@posteo.de>
References
Breitling LP (2010). dagR: a suite of R functions for directed acyclic graphs. Epidemiology 21(4):586-587.
Breitling LP, Duan C, Dragomir AD, Luta G (2022). Using dagR to identify minimal sufficient adjustment sets and
to simulate data based on directed acyclic graphs. Int J Epidemiol 50(6):1772-1777.
Greenland S, Pearl J, Robins JM (1999). Causal diagrams for epidemiologic research. Epidemiology 10(1):37-48.
See Also
dag.adjustment
, find.paths
,
eval.paths