3.2 — DAGs — Practice
Answers
For each of the following examples:
- Write out all of the causal pathways from
X(treatment of interest) toY(outcome of interest). - Identify which variable(s) need to be controlled to estimate the causal effect of
XonY. You can usedagitty.netto help you, but you should start trying to recognize these on your own! - Draw the DAGs in
rusingggdag. After setting up the dag withdagify()(and specifyingexposureandoutcomeinsidedagify), pipe that intoggdag(). Try again piping it instead intoggdag_status()(to highlight what is X and what is Y). Try again piping it instead intoggdag_adjustment_set()to show what needs to be controlled.
Don’t forget to install ggdag!
Question 1

Question 2

Question 3

Question 4

Question 5
