Skip to Content

Direct Effect

The Direct Effect is the local rate at which the mean of the Target Node changes with the mean of one Driver Node when BayesiaLab automatically adjusts for all Confounders. In Observation Mode, Likelihood Matching maintains each Confounder’s reference distribution as the driver varies. A fixed distribution can still assign positive probability to several states.

The Total Effect makes no automatic adjustment. In the Chapter 11 marketing comparison, the reported slope of Sales\mathit{Sales} with respect to Incentives\mathit{Incentives} is 1.0791 without automatic adjustment and 0.5343 with it. The covariates and their class designations are the same in both runs.

Definition

Let mm be the mean of Driver Node XX and fX(m)f_X(m) the mean of Target Node YY inferred for that driver mean. For the Direct Effect Curve, BayesiaLab holds the distributions of the Confounders fixed. At the reference driver mean m0m_0, the effect in original units is

DEX=fX′(m0)\mathrm{DE}_X = f_X'(m_0)

For a small change δX\delta_X in the driver mean, the estimated target change is approximately DEX δX\mathrm{DE}_X\,\delta_X. To evaluate a particular finite change from aa to bb, compare fX(b)f_X(b) with fX(a)f_X(a) on the curve.

How BayesiaLab Computes the Direct Effect

For each driver, BayesiaLab repeats the following calculation.

BayesiaLab automatically fixes the distributions of the Confounders (see Which Nodes Are Held Fixed below).

For a numerical-evidence curve, BayesiaLab varies the driver mean using Minimum Cross-Entropy (MinXEnt). The chart also offers Use Hard Evidence to evaluate individual driver states.

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 slope of the numerical response curve at the reference mean of the driver. With no prior evidence, this is its a priori mean, shown at zero on a Delta Mean axis.

Loading SVG...

In the five-node perfume network below, each curve represents a separate calculation with the same target. Holding the other ratings fixed changes the shape of the response. Depending on the network, a Direct Effect can be smaller than its Total Effect, larger, or of the opposite sign.

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

Confounders and Non-Confounders describe roles the analyst designates for the question being studied. BayesiaLab treats eligible nodes other than the driver and target as Confounders by default and adjusts for all of them automatically. Two exemptions matter when reading a report.

  • A node assigned to the predefined class Non_Confounder\mathrm{Non\_Confounder} is a Non-Confounder and can respond. For example, exempt a mediator when its response is part of the effect of interest.
  • A Not-Observable node in the class Factor\mathrm{Factor} is also exempt. Latent factors created by Multiple Clustering are a common example.

Selecting drivers tells BayesiaLab which curves or report rows to compute. For each row, adjustment still covers all the Confounders for that driver, including nodes outside the selection.

In Observation Mode, Likelihood Matching uses evidence to maintain each fixed marginal distribution, as with Fix Probabilities on a Monitor. The analyst chooses which variables are appropriate to control. Fixing a mediator can suppress an effect of interest, and conditioning on a descendant of the outcome can introduce bias.

In Intervention Mode, Graph Surgery removes incoming arcs to the intervened node. Interpreting the result as a causal effect requires a graph and intervention that represent the question. Chapter 10 works through both mechanisms with the same augmented Simpson’s Paradox network.

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=DEX σXσY\mathrm{SDE}_X = \mathrm{DE}_X\,\frac{\sigma_X}{\sigma_Y}

It expresses the local slope in target standard deviations per driver standard deviation, allowing comparison across driver scales. 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=∣SDEX∣∑Xi∈Xa∣SDEXi∣C_X = \frac{\lvert \mathrm{SDE}_X \rvert}{\sum_{X_i \in X_a} \lvert \mathrm{SDE}_{X_i} \rvert}

When the sum of the selected nodes’ absolute Standardized Direct Effects is positive, their Contributions add up to 100%. A single selected node contributes 100% if its Standardized Direct Effect is nonzero. Each Contribution depends on which nodes are selected.

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=DEX maxX−minXmaxY−minYE_X = \mathrm{DE}_X\,\frac{\mathrm{max}_X-\mathrm{min}_X}{\mathrm{max}_Y-\mathrm{min}_Y}

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 X→YX \to Y is the direct causal path, and X←Z→YX \leftarrow Z \to 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.

Now add a mediator. In Chapter 10’s augmented example, the only causal path from Drug Administration\mathit{Drug\ Administration} to Outcome\mathit{Outcome} runs through Efficacy\mathit{Efficacy}. With Graph Surgery, the reported Direct Effect for the drug is zero while the mediator is fixed. Adding Efficacy\mathit{Efficacy} to Non_Confounder\mathrm{Non\_Confounder} frees that path. The same report then shows −0.0800, the total causal effect of the drug in this model. The command name specifies the calculation. The graph, evidence mode, and fixed nodes determine which causal question it answers.

Where the Direct Effect Appears in BayesiaLab