, 24 tweets, 9 min read
My Authors
Read all threads
It’s been a long time since I did a new #cartoonepi #tweetorial, so let’s talk about how CAUSAL GRAPHS can help us think about MEDIATION!
Consider the following example:

•Drug X improves blood pressure.
•Exercise also improves blood pressure.
•People who take Drug X exercise more than those who don’t.

The causal graph (DAG) below shows these variables & their relationships.
Now suppose we want to know *how much* we can improve people’s blood pressure by having them take Drug X and how much of that improvement is not because people taking Drug X exercise more.

What can we do?
To help us figure that out, first let me introduce you to a different kind of causal graph, called a SWIG.

SWIG stands for Single World Intervention Graph. These graphs help us visualize the interventions we want to do and the potential consequences of those interventions.
Let’s start by looking at a SWIG that shows what we might see in a world in which we intervened to have everyone exercise for 30 minutes a day, regardless of Drug X use.
Unlike the graph at the start of this thread (which was a DAG), the SWIG has 2 exercise nodes separated by a bar:
•the one on the left is what exercise would be if we did nothing;
•the one on the right is the value we want to set exercise to (30 min).
Another difference between the SWIG & the DAG is that the SWIG has a tiny version of the 30 min exercise node just above the blood pressure node.

This tells us that in the SWIG’s world, blood pressure we would see is at least partly a result of 30min of exercise.
The little tiny exercise node means that blood pressure on the SWIG is different from blood pressure in the DAG:
•in the DAG the node was *observed* blood pressure;
•in the SWIG it is *potential* (aka counterfactual) blood pressure.
Okay, so why does this help us with mediation? Because mediation questions are about complex interventions!

And because when we use SWIGs we can see that many of the common mediation questions people ask require us to know about multiple possible worlds all at once.
Let’s look at another SWIG. In the world of this SWIG, we are giving everyone 40mg of Drug X.

Now, both the exercise and blood pressure values are consequences of having had 40mg of Drug X, so both are counterfactuals.
If we want to know how much blood pressure improves when people get 40mg of Drug X vs 0mg of Drug X, our SWIG says we can just compare people with and without the Drug.

But we also want to know how much of the change is directly because of Drug X & not because exercise changes.
In theory, we have two broad choices for what to estimate now:
•controlled direct effect
•natural direct effect

In practice, the SWIG will help us see that we can really only ever estimate controlled direct effects!
So what’s a controlled direct effect?

The expected change in blood pressure when everyone gets 40mg Drug X vs 0mg Drug X *and* exercise is fixed to some set value, say 30 minutes.

Although we often don’t think about it, “fixing” exercise implies an intervention.
Here’s that SWIG:

We have 2 interventions & blood pressure depends on both of them.

To estimate a controlled direct effect we can compare the following two counterfactual blood pressures:
CDE(exercise = 30)
= E[BP^{x=40, e=30}]
– E[BP^{x=0, e=30}]
You might have noticed the effect is indexed by the exercise value, i.e. “CDE(exercise=30)”.

That’s because there are infinitely many controlled direct effects where exercise was set to some value. The direct effect of the drug might differ depending on which value we pick.
The controlled direct effect is like intervening on both the exposure *and* the mediator but then only changing the exposure to make the comparison.

What about the natural direct effect?
The natural direct effect compares blood pressure when we give everyone Drug X *and* we force them to exercise in the way that they would have if they hadn’t had Drug X, versus if we didn’t give them Drug X and didn’t alter their exercise.
Let’s write that out in notation:

E[BP^{x=40, E = e^{x=0}}]
–E[BP^{x=0, E = e^{x=0}}]

Weird, huh? We have to compare counterfactual blood pressures which depend on Drug X and on *counterfactual* exercise which itself depends on (a different value of) Drug X.
So what’s that SWIG?

We still have 2 intervention nodes but now our exercise intervention fixes people to exercise based on a counterfactual for exercise that doesn’t even happen in the world of this SWIG — the amount people *would* exercise if they had 0mg of Drug X!
Here’s the problem:
Even if we randomized Drug X and exercise, how could we be sure that we are correctly assigning people to the exercise that *they would have done* if they’d been in the Drug X=0mg group?
We can’t!

So how could we ever observe this data? We also can’t!
Since we can’t do a trial and we can’t observe this data, then we’re basically out of luck for estimating the Natural Direct Effect.¹
¹Unless we want to make some pretty strong assumptions & personally, I don’t!
This means we’re left with estimating (1 or more) Controlled Direct Effects.

If you want to know how much Drug X changes blood pressure, separate from changes in exercise, you have to tell us what level(s) of exercise you care about!

There’s no such thing as THE direct effect!
Also, since we need to treat exercise like an intervention, we *really* need to know all common causes of exercise & blood pressure b/c otherwise you’ll have bias!

Plus you need a well-defined intervention on the mediator, exercise (but that’s a story for another tweetorial!)
That’s all for today, thanks for sticking around! I hope you learned something and also had some fun!

For fun, let’s end with a poll. How do you feel right now:
Missing some Tweet in this thread? You can try to force a refresh.

Enjoying this thread?

Keep Current with Ellie Murray

Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

Twitter may remove this content at anytime, convert it as a PDF, save and print for later use!

Try unrolling a thread yourself!

how to unroll video

1) Follow Thread Reader App on Twitter so you can easily mention us!

2) Go to a Twitter thread (series of Tweets by the same owner) and mention us with a keyword "unroll" @threadreaderapp unroll

You can practice here first or read more on our help page!

Follow Us on Twitter!

Did Thread Reader help you today?

Support us! We are indie developers!

This site is made by just three indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3.00/month or $30.00/year) and get exclusive features!

Become Premium

Too expensive? Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal Become our Patreon

Thank you for your support!