Skip to Content

Direct Effect

The Direct Effect of a node on the Target Node is the change in the mean of the Target Node that accompanies a small change in the mean of that node while the other nodes in the network are held fixed. Holding the other nodes fixed blocks every path that runs through them, so only the direct relationship between the node and the Target Node remains.

Its counterpart, the Total Effect, lets all other nodes respond and therefore captures every open path, direct and indirect.

Definition

DEX=δYδXDE_X = \frac{\delta_Y}{\delta_X}

where XX is the Driver Node and YY is the Target Node. δX\delta_X is a small change in the mean value of XX, and δY\delta_Y is the inferred change in the mean value of YY while the other nodes are held fixed. The Direct Effect is the ratio of the two.

How BayesiaLab Computes the Direct Effect

The procedure is the same as for the Total Effect, with one addition: before the Driver Node is varied, the probability distributions of the other nodes are fixed.

The distributions of the other nodes are fixed (see Which Nodes Are Held Fixed below).

The mean value of the Driver Node is moved across its range of values, using Minimum Cross-Entropy (MinXEnt) to set the corresponding soft evidence.

For each value of the Driver Node, the network infers the posterior mean of the Target Node.

The resulting x-y pairs form the Direct Effect Curve of the Driver Node. Target Mean Analysis plots these curves.

The Direct Effect is the derivative of the curve at the a priori mean of the Driver Node, i.e., at Delta Mean = 0.

Loading SVG...

Each curve is computed individually, with the other Driver Nodes fixed at their marginal distributions. Plotting all Direct Effect Curves together, as below, shows how much flatter they typically are than the corresponding Total Effect Curves: the indirect paths that inflate the Total Effect are closed.

Loading SVG...

The plotted curves are not based on equations. No functions or parameters were estimated. The curves are purely the result of inference performed with the given network.

As with the Total Effect, the single-number Direct Effect summarizes a curve well only where the curve is close to linear around the mean. Look at the curves before relying on the summary.

Which Nodes Are Held Fixed

By default, BayesiaLab holds fixed every node other than the Driver Node and the Target Node, with two exceptions:

  • Nodes in the predefined class Non_Confounder. Add a node to this class when you do not want to control for it. Typical cases are a mediator, i.e., a node on a causal path from the Driver Node to the Target Node whose contribution you want to keep, and a descendant of the Target Node, which must not be fixed because doing so biases the estimate.
  • Not-Observable nodes in the class Factor, i.e., latent variables created by Multiple Clustering.

BayesiaLab has two mechanisms for holding a node fixed, and the Direct Effect functions use whichever is active:

  • Graph Surgery, when the nodes are in Intervention Mode. Fixing a node removes its incoming arcs, so the node can no longer be influenced by the rest of the network. There is no risk of biasing the estimate.
  • Likelihood Matching, when the nodes are in Observation Mode. Fixing a node maintains its probability distribution while the Driver Node is varied. This is what Fix Probabilities on a Monitor does by hand. Because the node is fixed by setting evidence on it, fixing a descendant of the Target Node biases the estimate; such nodes belong in Non_Confounder.

Chapter 10 of the e-book walks through both mechanisms on the Augmented Simpson’s Paradox and shows the effect of the Non_Confounder class on a mediated effect.

Standardized Direct Effect

The Standardized Direct Effect is the Direct Effect multiplied by the ratio of the standard deviation of the Driver Node to the standard deviation of the Target Node.

SDEX=δYδXσXσYSDE_X = \frac{\delta_Y}{\delta_X}\,\frac{\sigma_X}{\sigma_Y}

It removes the dependence on the units in which the Driver Node happens to be measured and makes the effects of different Driver Nodes comparable. The reasons are the same as for the Standardized Total Effect.

Contribution

The Contribution of a Driver Node is its share of the absolute Standardized Direct Effects of all Driver Nodes selected for the analysis:

CX=SDEXXiXaSDEXiC_X = \frac{\lvert SDE_X \rvert}{\sum_{X_i \in X_a} \lvert SDE_{X_i} \rvert}

The Contributions of the selected nodes add up to 100%. Because the denominator depends on the selection, a Contribution is only meaningful relative to the set of nodes it was computed with; selecting a single node yields a Contribution of 100%.

Elasticity

The Elasticity relates the change of the Target Node to the change of the Driver Node, each measured relative to its own range of values:

EX=δY/(maxYminY)δX/(maxXminX)E_X = \frac{\delta_Y/(max_Y - min_Y)}{\delta_X/(max_X - min_X)}

Like the Standardized Direct Effect, the Elasticity is unit-free. It uses the ranges of the nodes rather than their standard deviations.

In BayesiaLab’s reports, positive effects are shown in blue and negative effects in red.

Total Effect vs. Direct Effect

Simpson’s Paradox shows the difference most clearly. In the network below, the arc XYX → Y is the direct causal path, and XZYX ← Z → Y is a non-causal path through the confounder ZZ.

Loading SVG...

The Total Effect leaves both paths open and returns the effect observed in the whole population. The Direct Effect fixes ZZ, which blocks the non-causal path, and returns the effect of the direct path alone. In the e-book’s Simpson’s Paradox example, the Total Effect of XX on YY is +0.1, and the Direct Effect is −0.1, which equals the Average Treatment Effect obtained by adjustment.

Which one you need depends on the question. For prediction from observation, the Total Effect gives the expected change of the Target Node. For the effect of an intervention on the Driver Node, the Direct Effect is the starting point, with one caveat: it blocks indirect causal paths as well as non-causal ones. If part of the causal effect runs through a mediator, add the mediator to Non_Confounder so that its contribution is kept.

Whether the Direct Effect equals the causal effect depends on the network being causal and on the set of fixed nodes being the right adjustment set. See Chapter 10: Causal Effect Identification and Estimation.

Where the Direct Effect Appears in BayesiaLab