causal-inference-in-R
causal-inference-in-R copied to clipboard
chapter 4 edits
Mostly minor edits
We should time order Figure 4.3, especially since the text refers to the timing
In the collider discussion, this isn't clear to me
Sometimes, people draw the path opened up by conditioning on a collider connecting x and y.
I haven't seen this, though I'm sure you're right that it happens. What I'm more familiar with is the box around the collider, which is read out as an open path. Do we want to mention that as well?
In the callout box, we have
Here’s a condensed version of what ggdag_adjustment_set() is doing:
which removes arrows from the DAG. It's not exactly what ggdag_adjustment_set does, since that function grays out the adjusted edges (which is typically preferred). Suggest changing those line colors instead.
In our next meeting, it would be great to talk about choice of adjustment method in the context of m-bias. I believe there are cases where IPW can be robust against this (certainly true that it can resolve selection bias) while direct/regression adjustment cannot. I think this has to do with the notion that weighting "removes arrows" while regression adjustment and/or stratification "draws boxes."
The job is failing because we need the dev version of tidysmd now, but I'll take care of that before merging
What I'm more familiar with is the box around the collider, which is read out as an open path. Do we want to mention that as well?
Maybe I'm not sure what you mean, but we already use and discuss the box notation. What did you have in mind?
We should time order Figure 4.3, especially since the text refers to the timing
I want it like this so people are forced to think about the structure and the arrows. In the workshop, though, we later show the time-ordered version, which we don't here. We should add that to the time-ordering section
It's not exactly what ggdag_adjustment_set does
Yes, it is. shadow = TRUE adds the greyed-out lines. We could mention that, but I don't want to get distracted by perfect replication here, though, as the point is about the geoms.
In our next meeting, it would be great to talk about choice of adjustment method in the context of m-bias. I believe there are cases where IPW can be robust against this (certainly true that it can resolve selection bias) while direct/regression adjustment cannot. I think this has to do with the notion that weighting "removes arrows" while regression adjustment and/or stratification "draws boxes."
I've thought this through already, and it can, but it's silly. You could use g-comp or IPW the same way you do for time-varying exposures/confounding, but it would require you to have the two unmeasured confounders, in which case you could just adjust for them through direct adjustment. So you can, but it's not that helpful.
Note to self: I was wrong about shadow = TRUE. It is now the default, per... checks notes... me https://github.com/r-causal/ggdag/issues/135. So it would indeed be better to use color. It was not the default at the time that I wrote this chapter, so it needs to be updated
If you run usethis::pr_merge_main() and push, this should pass (excepting any issues in this PR)
For this sentence
We could get the best of both worlds by including both variables: between the better measurement of
skills_courseand the better modeling ofprepared, we might have a better chance of minimizing confounding from this path.
Would you like to show gg_adjustment_set() with type = "all" to show how this strategy aligns with that function call?
For the example shown by Figure 4.23, I would suggest labelling these as real confounding entities we wish we would have measured, but didn't (instead of labelling them as u1 and u2). Maybe something like "sleep quality" and "breakfast". I know theoretical "unmeasured" framing can be useful for sensitivity analyses, but I think it far more common that we didn't measure a variable the subject matter experts would suggest we have when collaboratively constructing the DAG.