A direct effect answers a focused causal question: if X changes while the other variables in the system, except outcome Y, are held fixed, how does Y change? It is the effect carried by the direct arrow X → Y, rather than by routes through other variables. This differs from a total effect, which allows every causal path from X to Y to operate. section 6.1.2
The distinction matters when an intervention can work both on its own and through a mediator. For a publishing decision, Topic can influence Pageviews directly through reader interest and indirectly through the advertising Platform selected. If the question is about the topic itself rather than the combined consequences of topic and platform, the desired quantity is the direct effect. section 3.2.4 section 6.1.2
Graph illustrating the influence of Topic on Pageviews. This graph can help us understand how the topic affects the number of pageviews a page receives. Additionally, we may also explore how the platform affects pageviews.
Use the graph to identify the direct Topic → Pageviews arrow and the alternative path through Platform before choosing an estimand. section 6.1.2
In a linear model, the effects decompose cleanly: total effect = direct effect + indirect effect. The indirect effect is transmitted through every causal path except the direct path. This additive rule is specific to linear models; nonlinear definitions require counterfactual reasoning and do not generally preserve the same decomposition. section 6.1.2
Hotel distance, price, and customers
Suppose distance from town lowers customer demand directly, but also leads a hotel to set a lower price, which can increase demand. In synthetic data, distance has a direct effect of −10 on customers. Its indirect effect through price is −2 × −3 = 6, so the total effect is −4. A regression of customers on distance alone recovers the total effect because it leaves the historical price pathway active. Including price and distance in the regression instead isolates the direct distance coefficient, near −10. section 6.1.1 section 6.1.2
To estimate a direct effect with linear regression, reason from the causal graph rather than from predictive fit:
- Block back-door paths by controlling for appropriate confounders; otherwise the coefficient of X can be biased. section 7.4.5
- Also control for mediators whose paths from X to Y must be excluded from the target direct effect. section 7.4.5
- Do not treat every descendant of X as a variable to control for, because descendants can include colliders. section 7.4.5
- In a simple mediator graph, estimate the direct effect with Y ~ X + Z and the total effect with Y ~ X; with a confounder Z, both use Y ~ X + Z. section 6.1.2
A direct-effect estimate is therefore tied to a stated intervention and a specified graph. Changing whether a mediator is held fixed changes the causal question being answered. For complex graphs, select covariates that close back-door paths and block mediator-containing paths, then interpret the X coefficient as the direct effect under the linear-model conditions. section 3.2.4 section 7.4.5
