Why Separate Direct and Total Effects?
When a treatment affects a later covariate, and that covariate affects the outcome, the treatment can reach the outcome along more than one path. One path runs directly from the treatment to the outcome; another runs through the intermediate covariate. A coefficient for the treatment in an outcome equation describes the direct path in a particular model. It does not, by itself, include the effect transmitted through the covariate.
This distinction is central in treatment-confounder feedback: an earlier treatment can change a later covariate that matters for the outcome and for subsequent treatment decisions. Here we isolate the path decomposition in a linear two-period model. We compare values of the first treatment while holding the second treatment fixed, so that the effect through the intermediate covariate can be derived without also introducing a model for how the second treatment is assigned.
A Two-Period Linear Structural Model
Let \(X\) denote baseline covariates, \(A_0\) the first treatment, \(L_1\) the intermediate covariate measured after \(A_0\), \(A_1\) the second treatment, and \(Y_2\) the final outcome. Consider the structural equations
For a scalar \(X\), the terms \(\alpha_X X\) and \(\beta_X X\) are ordinary products; for a vector \(X\), they denote inner products. The equations are additive and linear, with no treatment-by-covariate or treatment-by-treatment interactions. In particular, the effect of changing \(A_0\) in the outcome equation does not vary with \(L_1\) or \(A_1\).
For these contrasts to have a causal interpretation, the structural equations must describe outcomes under interventions: setting a treatment must not change the distribution of the disturbance terms, and the interventions being compared must be well-defined. We take \(E[\varepsilon_L\mid X=x]=0\) and \(E[\varepsilon_Y\mid X=x]=0\). No independence between the two disturbances is needed for the mean contrasts derived below. These are structural effects, not automatically effects identified by a regression on observed data; identification from observational data additionally requires appropriate assumptions about treatment assignment, as well as consistency, positivity, and adequate model specification.
Worked Example: A Positive Mediated Path
Suppose a one-unit increase in \(A_0\) raises \(L_1\) by 2 units, and each unit of \(L_1\) raises \(Y_2\) by 0.8 units. The direct coefficient of \(A_0\) in the outcome equation is 1.5. Let \(A_1\) and \(X\) be held fixed. Find the direct, mediated, and total effects for increasing \(A_0\) from 0 to 1.
Here \(\alpha_A=2\), \(\beta_L=0.8\), \(\beta_A=1.5\), and \(a-a'=1\). The direct contrast is \(1.5(1)=1.5\). The change in \(L_1\) is \(2(1)=2\), so the mediated contrast is \(0.8(2)=1.6\). Adding the two paths gives a total contrast of \(1.5+1.6=3.1\).
The total effect is larger than the direct effect because the mediated path points in the same direction. Calling 1.5 “the effect of the first treatment” without specifying that it is direct would omit the additional 1.6 units transmitted through \(L_1\).
Deriving the Effect Decomposition
Write \(L_1(a)\) for the value of the intermediate covariate when \(A_0\) is set to \(a\), and \(Y_2(a,a_1,l)\) for the outcome when \(A_0=a\), \(A_1=a_1\), and \(L_1=l\) are set. The structural equations give the corresponding counterfactual values by replacing the treatment and covariate inputs with their intervention values.
Derivation. For the controlled direct effect, compare the two outcomes with the same \(l\), \(a_1\), and \(x\). Subtracting cancels every term except the direct treatment term:
For the mediated effect, the change in the intermediate covariate is
The outcome changes by \(\beta_L\) units per unit change in \(L_1\). Thus the outcome contrast attributable to this change in \(L_1\), with the first treatment term held at \(a'\), is
For the total effect, substitute the intermediate-covariate equation into the outcome equation, using \(L_1(a)\) in the outcome:
Now subtract the corresponding expression for \(a'\). The baseline terms, fixed \(A_1\) term, and disturbance terms cancel, leaving
Taking expectations conditional on \(X=x\) gives the same contrast. In this additive model, the total effect is exactly the sum of the direct and mediated effects. This decomposition is an algebraic consequence of the stated structural equations; it is not a universal formula for nonlinear models or models with interactions. \(\square\)
Worked Example: Opposing Direct and Mediated Paths
Suppose \(\alpha_A=-3\), \(\beta_L=0.5\), and \(\beta_A=2\). Find the effects of increasing \(A_0\) from 1 to 2, with \(A_1\) fixed. Explain the sign of the total effect.
The treatment change is \(a-a'=2-1=1\). The direct effect is \(2(1)=2\). The intermediate covariate changes by \((-3)(1)=-3\), so the mediated effect is \(0.5(-3)=-1.5\). Therefore the total effect is \(2-1.5=0.5\).
The paths oppose one another: the direct path raises the outcome, while the pathway through \(L_1\) lowers it. The net total effect remains positive, but is smaller than the direct effect. In general, a negative mediated effect does not imply a negative total effect; the signs and magnitudes of both paths matter.
When the Decomposition Changes
The simple product \(\beta_L\alpha_A\) is the mediated effect because the model says that \(A_0\) changes \(L_1\) by the constant \(\alpha_A(a-a')\), and that each unit of \(L_1\) changes the outcome by the constant \(\beta_L\). If either relationship varies by treatment level, the product need not describe the mediated contrast.
For example, if the outcome equation also contains an interaction \(\beta_{AL}A_0L_1\), then the outcome change associated with \(A_0\) depends on the value of \(L_1\). A single controlled direct effect no longer applies at all mediator values, and the total contrast must be calculated from the full equations at the specified intervention values. Likewise, if \(A_1\) is allowed to respond to \(L_1\), holding \(A_1\) fixed omits any pathway from \(A_0\) through \(L_1\) to \(A_1\). The formula above is deliberately for a contrast with \(A_1\) fixed; a total effect under a treatment policy that lets \(A_1\) vary requires a model for that later treatment as well.
Worked Example: Exact Cancellation of the Two Paths
Let \(\alpha_A=2\), \(\beta_L=1.25\), and \(\beta_A=-2.5\). For a one-unit increase in \(A_0\), calculate the two component effects and the total effect, with \(A_1\) fixed.
The direct effect is \(\beta_A(1)=-2.5\). The treatment raises \(L_1\) by \(\alpha_A(1)=2\), giving a mediated effect of \(\beta_L\alpha_A(1)=1.25(2)=2.5\). Thus the total effect is \(-2.5+2.5=0\).
A zero total effect does not mean that neither pathway operates: both component effects are nonzero and exactly offset. This distinction matters when interpreting a total contrast or deciding whether the direct coefficient alone describes the treatment’s consequences.
Interpretation, Diagnostics, and a Common Mistake
The direct coefficient \(\beta_A\) and the total-effect slope \(\beta_A+\beta_L\alpha_A\) answer different questions. The first compares outcomes while holding the intermediate covariate fixed. The second lets that covariate change as it would under the first-treatment intervention. Neither coefficient should be given a causal interpretation just because it appears in a fitted regression: causal interpretation depends on the structural and treatment-assignment assumptions, and on the target intervention being defined.
Useful checks are to verify the temporal order \(A_0\), then \(L_1\), then \(A_1\) and \(Y_2\); confirm that the contrast holds \(A_1\) fixed; and check that the assumed linear equations have no omitted interactions or additional pathways. In empirical work, inspect whether the linear mean relationships are plausible over the treatment ranges being contrasted, whether there is adequate support for those treatment values, and whether residual or specification diagnostics indicate serious model failure. Such diagnostics can reveal poor fit or extrapolation, but cannot by themselves establish the causal assumptions.
- Common mistake: “The coefficient of \(A_0\) in the outcome equation is the total effect.” This overlooks the path \(A_0\to L_1\to Y_2\).
- Correction: Under this model, the direct effect is \(\beta_A(a-a')\), the mediated effect is \(\beta_L\alpha_A(a-a')\), and their sum is the total effect when \(A_1\) is fixed.
- Another limitation: If the mediator-outcome relation is nonlinear or effect-modified, multiplying two coefficients may not yield the relevant mediated contrast; calculate the contrast from the specified structural equations instead.
Check Your Understanding
Work through each contrast using the linear path decomposition. Solutions follow the questions.
- If \(\alpha_A=1.5\), \(\beta_L=2\), and \(\beta_A=0.5\), what are the direct, mediated, and total effects for a two-unit increase in \(A_0\), with \(A_1\) fixed?
- If \(\alpha_A=-2\), \(\beta_L=1\), and \(\beta_A=-1\), what is the total effect per one-unit increase in \(A_0\)? Which direction does each path point?
- Why is \(\beta_A\) not generally the total-effect slope in this model?
- What additional pathway is excluded when \(A_1\) is held fixed rather than allowed to respond to \(L_1\)?
Solutions. (1) The direct effect is \(0.5(2)=1\); the mediated effect is \(2(1.5)(2)=6\); the total is \(1+6=7\). (2) The direct effect is \(-1\), and the mediated effect is \(1(-2)=-2\), so the total is \(-3\); both paths point downward. (3) Because \(A_0\) also changes \(L_1\), which changes \(Y_2\), the total-effect slope includes \(\beta_L\alpha_A\) as well as \(\beta_A\). (4) Holding \(A_1\) fixed excludes a pathway in which changing \(A_0\) changes \(L_1\), which then changes the later treatment \(A_1\), which in turn affects \(Y_2\).