How Causal Mediation and Mechanism Analysis Work | Direct Effects, Indirect Effects and the Difficult Question of How a Cause Produces an Outcome

Wait, what? Discovering that something causes an outcome still leaves another question unanswered: how did the effect get there?

A tutoring programme may improve examination performance. A policy may reduce congestion. A training programme may improve workplace safety. Knowing the total effect is important, but explanation often requires another layer: which intermediate processes carried the effect from the intervention to the outcome?

The one-sentence answer

Causal mediation analysis asks how much of a causal effect travels through a specified intermediate variable or pathway, separating carefully defined direct and indirect effects under assumptions that are usually stronger than those needed to estimate the total effect.

Quick Read

Association answers “moves with”; mediation asks “travels through”

Suppose students who use retrieval practice remember more material, and students who remember more material score higher. It is tempting to conclude that retrieval practice improves examination scores because it improves memory retrieval.

That may be true, but the observed correlations do not establish the mechanism. Students who retrieve more successfully may also study longer, receive more feedback, have stronger prior knowledge or differ in motivation. The mediator itself can be confounded with the outcome.

Mediation is therefore a causal problem, not a decorative extension of regression.

The three-variable picture

The simplest mediation story contains three roles:

The proposed pathway is A → M → Y, while A may also influence Y through other routes. But a causal diagram immediately reminds us to look for additional variables that cause A, M or Y, and to distinguish pre-treatment confounders from variables created by the treatment itself.

Total effect: begin with the whole before splitting the pathway

The total effect compares the outcome under one treatment condition with the outcome under another. In potential-outcomes language, it asks how Y would differ if the same target population were assigned to different exposure levels.

This total effect is often easier to define than the mechanism. If treatment is randomised, the total effect can sometimes be estimated with relatively modest assumptions. Once we ask how much of that effect operates through M, the mediator becomes part of the counterfactual intervention, and the assumptions multiply.

Natural direct and indirect effects

One influential causal framework defines natural direct and natural indirect effects. Informally, a natural direct effect asks what would happen if treatment changed but the mediator could somehow be held to the value it would naturally have taken under the comparison treatment. The natural indirect effect asks what would happen if the treatment were held fixed while the mediator were changed to the value it would have taken under the alternative treatment.

These are cross-world counterfactual ideas: they combine potential outcomes under different hypothetical conditions. That makes them scientifically informative but also demanding. Identification requires strong assumptions connecting treatment, mediator and outcome processes.

Why the old “three regressions” recipe is not enough

Traditional mediation teaching often used a sequence of regression conditions: treatment predicts outcome; treatment predicts mediator; mediator predicts outcome controlling for treatment; the treatment coefficient shrinks after adding the mediator.

Those regressions can be descriptive, but they do not by themselves establish causal mediation. They can fail with nonlinear outcomes, treatment-mediator interactions, confounding, measurement error and post-treatment common causes. Modern causal mediation instead begins with counterfactual definitions and explicit identification assumptions.

The identification assumptions are the real engine

For common natural-effect approaches, researchers generally need sufficiently strong control of several confounding structures. In plain language, after conditioning on appropriate pre-treatment covariates, treatment should be unconfounded with the outcome; treatment should be unconfounded with the mediator; and the mediator should be unconfounded with the outcome.

The third requirement is often the hardest. Even when A is randomised, M usually is not. People arrive at different mediator values for reasons that may also affect Y.

Randomising the treatment does not automatically randomise the mediator.

The dangerous case: mediator-outcome confounders caused by treatment

Suppose a study programme A affects confidence L, confidence affects use of a retrieval strategy M, and confidence also affects examination performance Y. Now L is a mediator-outcome confounder—but L is itself caused by A.

Simply adjusting for L can block part of the treatment effect or create other distortions. Ignoring L leaves mediator-outcome confounding. This structure is one reason causal mediation can require more advanced estimands and methods than ordinary regression adjustment.

Interventional direct and indirect effects

Modern mediation research includes alternatives to natural effects, including interventional direct and indirect effects. Rather than setting an individual’s mediator to the exact counterfactual value it would have taken under another treatment, these estimands can intervene on the distribution of the mediator.

That can make the hypothetical intervention more scientifically meaningful in settings where exact individual-level mediator manipulation is impossible or where exposure-induced mediator-outcome confounding complicates natural effects. The choice of estimand should therefore follow the scientific question, not habit.

Interaction: the pathway may change depending on treatment

Suppose increasing M improves Y much more strongly under treatment than under control. Then A and M interact. A simple “a path × b path” product from linear models may no longer capture the causal decomposition of interest.

Interaction is not an inconvenience to be deleted. It can be part of the mechanism. The effect of changing the mediator may genuinely depend on the treatment state.

Mediation is not moderation

A mediator asks through what pathway an effect operates. A moderator asks for whom or under what conditions an effect differs. Prior knowledge might moderate the effect of a tutoring intervention: perhaps the programme helps low-baseline students more. Retrieval strength might mediate part of the programme’s effect: the intervention changes retrieval, which changes performance.

A variable can play different causal roles in different models, so the role must be defined by the causal question and temporal structure rather than by its column name.

Measurement error in the mediator matters twice

Mediators are often latent or imperfectly measured: motivation, engagement, stress, understanding, institutional trust, adherence or cognitive strategy. Measurement error can attenuate associations and distort the decomposition of effects. If the mediator is measured differently across treatment groups, the problem becomes even more serious.

This is where mediation connects to construct validity, measurement models, reliability and measurement invariance. A causal pathway cannot be interpreted more precisely than the mediator itself is measured.

Temporal ordering is necessary but not sufficient

A useful mediation design establishes that A occurs before M and M before Y. Cross-sectional datasets that measure mediator and outcome at the same time make the mechanism particularly hard to defend.

But correct ordering does not solve confounding. A variable can be measured earlier and still share unmeasured causes with later variables. Longitudinal structure helps define the pathway; causal assumptions still do the identification work.

A worked education example

Suppose a randomised study assigns students to a retrieval-practice programme or normal revision. The total effect on a later examination is positive. Researchers hypothesise that the programme works partly because it increases successful delayed retrieval M after four weeks.

A naive analysis regresses examination score on treatment and delayed retrieval. But delayed retrieval is also influenced by prior knowledge, study time, attendance and perhaps confidence that changed after treatment. Some of those variables may confound the mediator-outcome relationship; others may themselves be treatment consequences.

A responsible mediation analysis first defines the exact direct and indirect estimands, draws the causal structure, identifies pre-treatment and post-treatment covariates, states which confounding assumptions are needed, chooses an estimator compatible with the structure, and performs sensitivity analysis for plausible unmeasured confounding.

The final result might suggest that a substantial portion of the treatment effect is transmitted through delayed retrieval. Even then, the mechanism should be described as conditional on the specified causal model and assumptions—not as though the pathway had been directly observed inside the student’s mind.

Sensitivity analysis: how fragile is the pathway claim?

Because mediator-outcome confounding is difficult to eliminate, sensitivity analysis is especially important. The analysis asks how strong an unmeasured confounder or residual dependence would have to be to materially change the estimated indirect effect.

This does not prove that the assumptions are correct. It translates an invisible assumption into a visible robustness question. A mediation claim that disappears under very small deviations deserves weaker language than one that remains stable across a wide range of plausible confounding scenarios.

Multiple mediators and causal chains

Real mechanisms are rarely single-file paths. An intervention may change attention, then practice behaviour, then retrieval strength, then confidence, while several of these variables also influence one another. With multiple mediators, ordering, interaction and mediator-mediator confounding become increasingly important.

The temptation is to add every plausible mediator to one large model. But more variables do not automatically create a more truthful mechanism. Each added node introduces new causal assumptions, measurement problems and possible pathways that must be interpreted.

Mechanism evidence is broader than one mediation coefficient

A strong causal mechanism case can combine several forms of evidence: experimental manipulation of the treatment, direct manipulation of the proposed mediator when feasible, temporal ordering, process measurements, qualitative evidence, dose-response patterns, mechanistic theory, replication across settings and mediation estimates consistent with the broader causal story.

The mediation coefficient is therefore one piece of mechanism evidence, not the whole mechanism.

Common failure modes

How this connects across the eduKate Library

Causal mediation is a specialised mechanism-analysis bridge inside the wider causal and measurement estate. Continue with How Causal Inference Works, How Observational Studies Work, How Sensitivity Analysis and Robustness Checks Work, How Construct Validity and Measurement Models Work, How Structural Equation Modeling Works, and How Longitudinal and Panel Data Work.

Authoritative and current source corridor

The deeper idea

The total effect tells us whether changing A changes Y. Mediation asks a harder question: what sequence of changes carried that effect through the system?

That is why mechanism claims deserve more, not less, caution than ordinary causal-effect claims. Explaining how the world changed means we are no longer estimating one arrow. We are claiming a pathway.

Explore the connected learning guides

Choose the question that brought you here. Open one useful guide, try a small task, and stop when you have what you need.

Take one question further

The same learning habit can travel across subjects, while each subject keeps its own methods. These routes help you notice a difficulty, understand one part of it, and return to something you can do.

A word is familiar, but using it is difficult.

Move from recognising a word to retrieving it in a new context. Understand vocabulary plateaus.

Try it without the guide: Choose one word you already know. Close the guide and use it in a new sentence. Explain why it fits; try another context tomorrow.

A piece of writing has ideas, but the reader loses the thread.

Make the order of events and the links between sentences clear. Explore composition writing.

Try it without the guide: Choose one short paragraph. Read the relevant explanation, close it, and revise the paragraph. Ask someone to tell you what happened and why.

The Mathematics seems familiar, but marks still disappear.

Find the first point where the working stops being reliable. Find Secondary 4 A-Math mark leakage.

Try it without the guide: For a Secondary 4 A-Math question you have attempted, locate the first uncertain line. Repair that step, then try a comparable question without the worked answer.

A Science fact is remembered, but the explanation is incomplete.

Connect the evidence to a scientific idea and the resulting change. Follow the Primary Science learning route.

Try it without the guide: Choose a familiar Primary Science example. Explain the evidence, the idea and the result without notes. Then change one condition and explain your prediction.

Two accounts of the world seem to disagree.

Check the question, source, date and evidence before combining claims. Explore the World Knowledge research library.

Try it without the guide: Take one claim. Find the source best placed to support it, note its date, and state what remains uncertain. Return to your original question.

There is plenty of help, but independence is hard to see.

Check what the learner can understand and do after support is removed. Understand how education works.

Try it without the guide: Choose one small task the child has practised. Agree on a calm, brief attempt without prompts. Use what happens to choose one next step, then stop.

For the structure behind these connections, read the eduKateSingapore runtime manifest and the eduKate ecosystem boot contract. The reader map describes public navigation; those manifests preserve the wider ownership and return rules.

Discover more from eduKate Singapore

Subscribe now to keep reading and get access to the full archive.

Continue reading