Tutorials › Statistical Genetics › Direct, Indirect, and Total Genetic Effects

Genetic Mediation and Selection Bias · Tutorial 869 of 989

Direct, Indirect, and Total Genetic Effects

Learn to define and calculate direct, indirect, and total effects in a linear genetic mediation pathway, and distinguish effects per exposure unit from effects per allele.

Advanced 10 min read

What You'll Learn

  • Distinguish a genetic variant, an exposure, a mediator, and an outcome in a pathway model
  • Define direct, indirect, and total effects on the exposure scale
  • Derive the product-of-path-coefficients expression for the indirect effect
  • Convert exposure effects to per-allele genetic effects using the variant–exposure association
  • Recognize when direct and indirect paths reinforce or oppose one another
  • Separate a model-defined effect from the assumptions needed to identify it

Introduction

In genetic mediation, a genetic variant may influence an exposure, which may then influence an outcome both directly and through an intermediate phenotype. The same overall genetic association with the outcome can therefore represent several different pathways. Separating those pathways is essential for stating what an effect estimate means.

This tutorial defines direct, indirect, and total effects for a linear exposure–mediator–outcome pathway, with a genetic variant as a possible source of variation in the exposure. The central distinction is between effects per unit change in the exposure and effects per allele of the variant. These are related, but they are not the same estimand.

Definition: Let \(G\) denote a genetic variant, \(X\) an exposure, \(M\) a mediator, and \(Y\) an outcome. In the pathway \(G \to X\), \(X \to M\), \(M \to Y\), and \(X \to Y\), the direct effect of \(X\) on \(Y\) is the contribution along \(X \to Y\) that does not pass through \(M\). The indirect effect of \(X\) on \(Y\) is the contribution along \(X \to M \to Y\). The total effect of \(X\) on \(Y\) combines both paths.

A Linear Pathway Model

Consider the following additive structural equations. They specify the relationships represented by the pathway diagram and the scale on which the path coefficients are defined.

$$ \begin{aligned} X &= \alpha_X + \pi G + \varepsilon_X,\\ M &= \alpha_M + aX + \varepsilon_M,\\ Y &= \alpha_Y + c'X + bM + \varepsilon_Y. \end{aligned} $$

Here, \(\pi\) is the change in the mean of \(X\) per additional allele of \(G\); \(a\) is the change in the mean of \(M\) per unit increase in \(X\); \(b\) is the change in the mean of \(Y\) per unit increase in \(M\), holding \(X\) fixed; and \(c'\) is the change in the mean of \(Y\) per unit increase in \(X\), holding \(M\) fixed. The intercepts are \(\alpha_X,\alpha_M,\alpha_Y\), and the \(\varepsilon\) terms represent structural disturbances.

The equations describe a linear, additive model with no exposure–mediator interaction: the coefficient \(b\) does not depend on the value of \(X\). For the path decomposition below, assume the equations represent the stated pathways, their coefficients apply to the same target population, and there are no additional directed paths from \(X\) to \(Y\). To interpret the coefficients causally, the structural relationships must also have a valid causal interpretation; an algebraic decomposition alone does not establish that observational data identify causal effects.

Definition: For a one-unit increase in \(X\), the direct path effect is \(c'\), the indirect path effect through \(M\) is \(ab\), and the total effect is \(c' + ab\). For a change of \(\Delta\) units in \(X\), the corresponding effects are \(c'\Delta\), \(ab\Delta\), and \((c'+ab)\Delta\). These are effects on the scale of \(Y\), with the units determined by the model.

The product \(ab\) follows the two links in the mediated path. A one-unit increase in \(X\) changes \(M\) by \(a\) units; each unit change in \(M\) changes \(Y\) by \(b\) units. Their product is therefore the change in \(Y\) transmitted along \(X \to M \to Y\), per unit increase in \(X\).

Why the Total Effect Is the Sum of the Paths

The decomposition can be justified directly by substituting the mediator equation into the outcome equation. Doing so expresses the outcome using \(X\) and the structural disturbances, rather than \(M\).

$$ \begin{aligned} Y &= \alpha_Y + c'X + b(\alpha_M+aX+\varepsilon_M)+\varepsilon_Y\\ &= (\alpha_Y+b\alpha_M)+(c'+ab)X+(b\varepsilon_M+\varepsilon_Y). \end{aligned} $$

The coefficient multiplying \(X\) is \(c'+ab\). Thus, under this model, the total change in \(Y\) per unit change in \(X\) is the direct contribution \(c'\) plus the mediated contribution \(ab\). For this coefficient to also be the slope in a regression of \(Y\) on \(X\), the composite disturbance \(b\varepsilon_M+\varepsilon_Y\) must not be associated with \(X\) in the relevant model. For a causal interpretation, the structural equations and their assumptions must be appropriate for the causal question as well.

Worked Example: Decomposing an Exposure Effect

Suppose a hypothetical linear model describes an exposure \(X\), a mediator \(M\), and an outcome \(Y\). The mediator increases by \(a=0.60\) units per unit increase in \(X\), the outcome increases by \(b=0.25\) units per unit increase in \(M\) holding \(X\) fixed, and the direct path coefficient is \(c'=0.40\) outcome units per unit of \(X\). Calculate the direct, indirect, and total effects for a one-unit increase in \(X\).

Direct effect. The direct effect is \(c'=0.40\) outcome units per unit increase in \(X\).

Indirect effect. The path through \(M\) is the product of its two coefficients:

$$ ab=(0.60)(0.25)=0.15 $$

Thus, the indirect effect is \(0.15\) outcome units per unit increase in \(X\).

Total effect. Adding the two path contributions gives

$$ c'+ab=0.40+0.15=0.55. $$

Under the stated model, a one-unit increase in \(X\) corresponds to a total increase of \(0.55\) outcome units: \(0.40\) along the direct path and \(0.15\) through the mediator.

Effects Can Reinforce or Oppose Each Other

Direct and indirect effects need not have the same sign. If both are positive, they reinforce one another. If one is positive and the other negative, they oppose one another, and the total can be smaller than either path contribution. The total effect may even have a different sign from one of its component paths.

Worked Example: Opposing Direct and Indirect Paths

In a second hypothetical model, \(a=0.80\) mediator units per exposure unit, \(b=-0.50\) outcome units per mediator unit, and \(c'=1.10\) outcome units per exposure unit. Find the mediated and total effects for a one-unit increase in \(X\), and explain their directions.

The indirect effect is

$$ ab=(0.80)(-0.50)=-0.40 $$

The direct effect is \(1.10\) outcome units per unit increase in \(X\). Therefore, the total effect is

$$ c'+ab=1.10+(-0.40)=0.70. $$

The direct path increases \(Y\), while the mediated path decreases \(Y\). The mediated contribution offsets \(0.40\) of the direct contribution, leaving a total increase of \(0.70\) outcome units per unit increase in \(X\). It would be misleading to describe the indirect effect as a positive fraction of the total: here it has the opposite sign.

For this reason, the direct, indirect, and total effects should be reported with their signs and units. A proportion mediated, sometimes formed by dividing the indirect effect by the total effect, can be difficult to interpret when the effects oppose each other or the total is near zero. It is not needed to define the pathway-specific effects.

Moving From the Exposure Scale to the Allele Scale

The coefficients \(c'\), \(ab\), and \(c'+ab\) are effects per unit increase in \(X\). If the variant changes \(X\) by \(\pi\) units per allele, the corresponding effects along the specified pathways per allele are obtained by multiplying by \(\pi\). This follows because each additional allele changes \(X\) by \(\pi\), and the exposure-scale pathway effects apply to each unit change in \(X\).

$$ \begin{aligned} \text{direct effect per allele through }X\to Y &= \pi c',\\ \text{indirect effect per allele through }X\to M\to Y &= \pi ab,\\ \text{total effect per allele through }X &= \pi(c'+ab). \end{aligned} $$

These are effects of the variant transmitted through the stated exposure pathways. They are not the same estimands as the exposure effects themselves: \(\pi c'\) is measured per allele, while \(c'\) is measured per unit of \(X\). The equations also presume that the variant’s effect on \(Y\) operates through \(X\) in this pathway model. A direct route from \(G\) to \(Y\) outside \(X\) would contribute an additional term to the total genetic effect.

Worked Example: Converting Path Effects to Per-Allele Effects

Suppose a hypothetical variant is associated with a \(0.40\)-unit increase in exposure \(X\) per additional allele, so \(\pi=0.40\) exposure units per allele. Let \(a=0.50\) mediator units per exposure unit, \(b=0.30\) outcome units per mediator unit, and \(c'=0.20\) outcome units per exposure unit. Calculate the indirect and total effects per allele, then check the direct contribution.

First calculate the exposure-scale indirect effect:

$$ ab=(0.50)(0.30)=0.15 $$

The indirect genetic effect per allele is

$$ \pi ab=(0.40)(0.15)=0.060 $$

The direct genetic effect through \(X\to Y\) per allele is

$$ \pi c'=(0.40)(0.20)=0.080. $$

Adding these gives a total of \(0.060+0.080=0.140\) outcome units per allele. Equivalently, the exposure-scale total is \(c'+ab=0.20+0.15=0.35\) outcome units per exposure unit, so

$$ \pi(c'+ab)=(0.40)(0.35)=0.140 $$

The two calculations agree. The result is a model-based total effect of \(0.140\) outcome units per allele through \(X\); it should not be reported as \(0.140\) outcome units per exposure unit.

What the Path Decomposition Does—and Does Not—Say

A path diagram and its structural equations make the estimands explicit: which variable changes, which route carries the effect, and what units the coefficient uses. But writing a path model does not, by itself, show that its effects can be estimated causally from observed genetic associations. That requires suitable identification assumptions about the pathway and data. It is useful to keep the definition of an effect separate from the question of whether a particular analysis identifies it.

The simple product \(ab\) also depends on the additive model used here. If the effect of \(M\) on \(Y\) varies with \(X\), then a single constant \(b\) does not describe that relationship, and the decomposition cannot be used in this form without modification. The direct, indirect, and total effects must always be tied to their model and scale.

Common Mistake

  • Wrong reasoning: “The indirect effect is \(a+b\), because \(a\) and \(b\) are the two coefficients on the mediated path.”
  • Correction: The path coefficients multiply. A unit increase in \(X\) changes \(M\) by \(a\), and that change in \(M\) changes \(Y\) by \(b\) per mediator unit. Therefore the indirect effect per unit of \(X\) is \(ab\), not \(a+b\).
  • Another scale error: “The effect per allele is the same as the effect per unit of \(X\).” The per-allele effect through the pathway is multiplied by the variant–exposure association \(\pi\); it has units per allele.
Key takeaway: In the specified linear additive pathway, the exposure-scale direct effect is \(c'\), the indirect effect through the mediator is \(ab\), and the total effect is \(c'+ab\). If the genetic variant changes the exposure by \(\pi\) units per allele, the corresponding pathway effects per allele are \(\pi c'\), \(\pi ab\), and \(\pi(c'+ab)\).

Check Your Understanding

Answer each question using the linear pathway model and state units where appropriate.

  1. If \(a=0.40\) mediator units per exposure unit and \(b=0.50\) outcome units per mediator unit, what is the indirect effect per exposure unit?
  2. If \(c'=0.30\) and \(ab=0.20\), what is the total effect per exposure unit? Which path contributes \(0.20\)?
  3. Suppose \(c'=0.80\), \(a=0.50\), and \(b=-0.60\). Calculate the indirect and total effects for a one-unit increase in \(X\). Do the paths reinforce or oppose one another?
  4. A variant changes \(X\) by \(0.25\) units per allele, and the exposure-scale total effect is \(0.40\) outcome units per exposure unit. What is the total pathway effect per allele?
  5. Why does the algebraic identity \(c'+ab\) not, by itself, establish that an observational analysis has identified a causal total effect?
Clinical Biostats