What is a mediator, and why shouldn’t you adjust for it?
A mediator sits on the path from treatment to outcome: it is how the effect gets there, like leaf zinc between a foliar spray and the grain. Adjust for it and you block the very route the treatment works through, so a treatment that works can appear to do nothing. The rule: never adjust for anything the treatment causes.
Last time's quick check: never adjust for anything the treatment causes, and never for a collider. Today: the first of those, the mediator. A mediator sits on the path from treatment to outcome. It's how the effect gets there. Leaf zinc is the mediator between the spray and the grain.
Remember from 2.2: holding the middle of a chain fixed blocks it. So if you "control for" leaf zinc, you block the very route the spray works through, and the spray appears to do nothing. Not because it doesn't work, but because you've taken away the way it works.
Most effects travel by more than one route. Extra nitrogen raises grain protein directly. It also raises yield, and a bigger crop can dilute the protein in each grain. The total effect is what happens to protein when you add nitrogen, all routes together. That's usually what a farmer wants to know. The direct effect is what would happen if yield somehow stayed the same. That's a different question. Sometimes it's useful, but it isn't the answer to "should I apply it?"
Hold yield fixed, and you're no longer estimating the total effect. Yield hides a second trap. Weather drives both yield and protein. So nitrogen and weather both point into yield, which makes yield a collider as well as a mediator. Hold yield fixed and you open a route from nitrogen, through weather, to protein. You've removed part of the effect and added a bias. That's why the rule is so firm: never adjust for anything the treatment causes.
Mediators matter most where farming meets nutrition. In Kenya, a cluster-randomised trial gave some groups of farming families an agricultural programme alone, and others the same programme plus food, nutrition and hygiene support. Over two years, children's height-for-age improved by 0.11 standard-score units in the combined group. Their diets became more varied, with more iron-rich foods.
On a map, the extra support sits at the start of a chain: support, to a more varied diet, to child growth. Diet is a mediator, and measuring it helps show how the effect may have travelled. But the trial randomised the package, not the diet. So it can't say how much of the growth came through diet, or which part of the package did the work. Splitting an effect into its routes needs extra assumptions, starting with no hidden common cause of diet and growth.
The lesson the case study draws: more production alone may not improve nutrition. The route from farm to plate has to be built, not assumed. We've seen this shape before. In Module 1, maize became a staple without the alkaline cooking that frees its niacin, and pellagra followed.
The crop was the same; the step in the middle changed everything. Mediators are where farming's effects on nutrition are won or lost. Next: the variable you must never hold fixed, because doing so creates patterns out of nothing.
The total effect is what happens to the outcome when you change the treatment, by all routes together: extra nitrogen raises grain protein directly, and also raises yield, which can dilute the protein. The direct effect is what would happen if yield somehow stayed the same. The total effect is usually what a farmer wants to know.
Groups of farming families were randomised to an agricultural programme alone, or the same programme plus food, nutrition and hygiene support. Over two years, children’s height-for-age improved by 0.11 standard-score units in the combined group, and their diets became more varied. Because the package was randomised, not the diet, it can’t say how much came through diet.
Causal evidence is changing how farming is measured and rewarded. Leave your email and we will tell you when new films, courses and findings are published.
Prefer to read online? Vitagri also writes on Substack. See our privacy policy for how we use your email.