Skip to main content

DAGs

Directed Acyclic Graphs: They’re graphs with things (nodes) and lines (edges/paths) connecting them (not all of them usually.) But the lines are pointed (only in one direction) and you cannot have loops: you cannot start at one box and come back to it by following the pointy lines around the graph.

DAGs encode causal assumptions and structure at a high level. Very useful stuff. They’re not just pretty visualizations of treatments, effects, and confounders.

In A→YA \rightarrow Y, the arrow means that statistical association “flows” from AA to YY.

Since this is in a biostats context, we’ll say that

  • A=TreatmentA = \text{Treatment}
  • Y=OutcomeY = \text{Outcome}
  • C=ConfounderC = \text{Confounder}
  • U=Unobserved ConfounderU = \text{Unobserved Confounder}
  • M=MediatorM = \text{Mediator}

Also, direction matters. TODO: Association is plain lines?

A→Y̸  ⟹  Y→AA \rightarrow Y \not\implies Y \rightarrow A

Nodes​

Not much going on here. You have parents, children, ancestors, and descendants.

Paths​

Causal, Non-Causal, and Simple-Ass​

It's all Relative!

It’s all about where you want to start to where you want to end. In the examples below I am going from A→YA \rightarrow Y. Things change if I’m going, for example, from M1→YM_1 \rightarrow Y.

Causal is easy. It’s arrows “all the way” from one node to another.

A→YA→M→YA→M1→M2→Y\begin{aligned} A &\rightarrow Y \\[1pt] A &\rightarrow M \rightarrow Y \\[1pt] A &\rightarrow M_1 \rightarrow M_2 \rightarrow Y \end{aligned}

In a Non-Causal path, at least one arrow is flipped.

A→M1←M2→M3→Y\begin{aligned} A &\rightarrow M_1 \leftarrow M_2 \rightarrow M_3 \rightarrow Y \end{aligned}

A Simple-Ass Path1 doesn’t have pointy arrows. You draw this out to check later for collider paths, backdoor paths, causal paths, and so on.

A−M1−M2−M3−YA - M_1 - M_2 - M_3 - Y

Backdoors​

You see a “reverse arrow”, a backdoor, first. Let’s say you’re studying A→YA \rightarrow Y. This is a backdoor path. Note: the entire path is a backdoor path! Not just from A←M1A \leftarrow M_1

A←M1→M2→YA \leftarrow M_1 \rightarrow M_2 \rightarrow Y
M_1 M1 M_2 M2 M_1->M_2 A A M_1->A Y Y M_2->Y A->Y

This isn’t2:

A→M1←M2→YA \rightarrow M_1 \leftarrow M_2 \rightarrow Y

But it is a backdoor path if you are studying M1→YM_1 \rightarrow Y! Note that this is related to non-causal paths but not all non-causal paths are backdoor paths!

These are important becuase we don’t want them. They confound.

Conditioning​

Open and Blocked​

Both are regular-ass paths! They are neither


Patterns​


d-Separation​

Fancy term! TLDR: We use this to check if unwanted paths are blocked. That’s it. ++This does not mean that there are no paths between AA and YY++! Simple-ass paths still exist. They’re just blocked.

The Trick​

Remove all arrows going out of A. This means that all arrows going into A must be backdoor paths. You want to block these.

Marginal and Conditional​

The Backdoor Criteria​

Three questions:

  1. Does confounding exist?
  2. Can it be eliminated?
  3. What nodes are necessary to eliminate the confounding? We put these in an Adjustment Set

Remember that the goal here is to study the causal effect of AA on YY. So,

  • Causal paths from AA to YY should remain intact, and
  • Non-causal backdoor paths should be blocked
Don't be an over-achiever!

Be lazy. Look for the smallest set. Remember that any one node in a chain can work. For example:

AA

M-Bias​

The “M” comes from the shape.

U_1 U1 A A U_1->A L L U_1->L U_2 U2 U_2->L Y Y U_2->Y A->Y
The M Shape

Network effect. You may think you’re all set when you block some node but, especially in the case of those pesky colliders, this may create problems in other paths.

Miscellaneous​

Do you block mediators? Not usually. Not if you want the total causal effect.

Footnotes​

  1. Which is what I’m calling it. ↩

  2. Also note that it is a closed path because of the collider… ↩