Tutorials › Causal Inference › Sensitivity Analysis for Cross-World Assumptions

Mediation and Path-Specific Effects · Tutorial 796 of 972

Sensitivity Analysis for Cross-World Assumptions

Parameterize cross-world dependence, recompute natural effects over plausible values, and assess which conclusions remain robust.

Advanced 10 min read

What You'll Learn

  • Define a cross-world odds-ratio sensitivity parameter for binary mediator and outcome counterfactuals.
  • Calculate joint probabilities from marginal risks and a specified sensitivity value.
  • Recompute natural direct and indirect effects under departures from independence.
  • Check feasibility and interpret the direction and scale of sensitivity results.
  • Separate robust conclusions from conclusions that depend on the chosen parameter range.

Why Examine Cross-World Assumptions?

Natural direct and indirect effects involve counterfactuals from different treatment conditions in the same quantity. For example, \(Y(1,M(0))\) is the outcome under treatment 1 if the mediator were set to the value it would have taken under treatment 0. The cross-world independence assumption connects these counterfactuals in a way that allows the natural effect to be identified from observed data. But the joint behavior of \(Y(1,m)\) and \(M(0)\) is not directly observed for any person.

Sensitivity analysis asks how much the natural-effect estimate would change if that assumed cross-world relationship were relaxed. It does not discover the unobserved relationship from the data. Instead, it makes the dependence explicit, varies it over specified values, and reports which substantive conclusions hold across that range.

Definition: For binary counterfactuals \(Y(a,m)\) and \(M(a')\), their cross-world odds ratio is $$ \theta_{a,m,a'} = \frac{P(Y(a,m)=1,M(a')=1)P(Y(a,m)=0,M(a')=0)} {P(Y(a,m)=1,M(a')=0)P(Y(a,m)=0,M(a')=1)}. $$ When the relevant cell probabilities are positive, \(\theta_{a,m,a'}=1\) means the two counterfactuals are independent. Values above 1 indicate positive association on the odds-ratio scale, and values below 1 indicate negative association. This parameter describes a relationship between counterfactuals, not an effect of one counterfactual on the other.

A One-Parameter Sensitivity Model

For a transparent calculation, consider a binary treatment \(A\), binary mediator \(M\), and binary outcome \(Y\), with no baseline covariates. Let \(p=P(Y(a,m)=1)\) and \(r=P(M(a')=1)\) be the marginal risks under consideration, and let \(x=P(Y(a,m)=1,M(a')=1)\). Given \(p\), \(r\), and a specified cross-world odds ratio \(\theta\), the joint probability \(x\) is determined by

$$ \theta = \frac{x(1-p-r+x)}{(p-x)(r-x)}. $$

The joint probability must also be feasible: \(\max(0,p+r-1)\leq x\leq\min(p,r)\). Independence gives \(x=pr\). For other values of \(\theta\), solve the equation for the feasible \(x\). The other three cells then follow from the margins: \(P(Y=1,M=0)=p-x\), \(P(Y=0,M=1)=r-x\), and \(P(Y=0,M=0)=1-p-r+x\).

Worked Example: Solving for a Joint Counterfactual Probability

Suppose \(P(Y(1,0)=1)=0.10\), \(P(M(0)=1)=0.40\), and the sensitivity value is \(\theta=2\). Find \(x=P(Y(1,0)=1,M(0)=1)\).

Substitute the margins into the odds-ratio equation:

$$ 2=\frac{x(1-0.10-0.40+x)}{(0.10-x)(0.40-x)} =\frac{x(0.50+x)}{(0.10-x)(0.40-x)}. $$

Cross-multiplying and expanding gives

$$ x(0.50+x)=2(0.04-0.50x+x^2), \qquad x^2-1.50x+0.08=0. $$

The roots are \((1.50\pm\sqrt{1.93})/2\), approximately \(0.05538\) and \(1.4446\). Only \(0.05538\) is feasible, because \(x\) must lie between 0 and \(\min(0.10,0.40)=0.10\). Thus the joint risk is \(x\approx0.05538\). For example, the corresponding probability of \(Y(1,0)=1\) and \(M(0)=0\) is \(p-x=0.10-0.05538=0.04462\).

This parameterization is useful when the marginal risks \(p\) and \(r\) can be estimated under the other mediation assumptions, while the cross-world dependence cannot. It does not remove the need for those other assumptions. In the simple setting used below, treatment is randomized, consistency holds, mediator and outcome values have positive probability in each relevant treatment group, and there is no unmeasured mediator-outcome confounding within treatment groups. These conditions support the observed-data estimates of the marginal counterfactual risks. The cross-world independence restriction is the assumption varied in the sensitivity analysis.

Calculating Natural Effects Across Sensitivity Values

For binary \(M\), the natural mean of interest can be written using the joint probabilities:

$$ E[Y(a,M(a'))] =P(Y(a,0)=1,M(a')=0)+P(Y(a,1)=1,M(a')=1). $$

If \(x_0=P(Y(a,0)=1,M(a')=1)\) and \(x_1=P(Y(a,1)=1,M(a')=1)\), this becomes \(p_{a0}-x_0+x_1\), where \(p_{am}=P(Y(a,m)=1)\). Thus changing the cross-world dependence changes the natural mean even when all the marginal risks are held fixed.

Worked Example: Natural Effects Under Three Dependence Values

Consider hypothetical population risks with \(P(M=1\mid A=0)=0.40\), \(P(M=1\mid A=1)=0.60\), and the following outcome risks conditional on treatment and mediator:

Treatment \(a\)Mediator \(m\)\(P(Y=1\mid A=a,M=m)\)
000.08
010.20
100.10
110.30

Under the assumptions stated above, the observed outcome risks by treatment are

$$ E[Y(0)]=0.60(0.08)+0.40(0.20)=0.128, \qquad E[Y(1)]=0.40(0.10)+0.60(0.30)=0.220. $$

For the cross-world mean \(E[Y(1,M(0))]\), use \(r=P(M(0)=1)=0.40\). We examine a one-parameter model that assigns the same \(\theta\) to the two pairs \(Y(1,0),M(0)\) and \(Y(1,1),M(0)\). The margins \(p\) for these pairs are 0.10 and 0.30. Solving the joint-probability equation gives:

  • For \(\theta=0.5\), \(x_0\approx0.02621\) and \(x_1\approx0.08655\).
  • For \(\theta=1\), independence gives \(x_0=(0.10)(0.40)=0.04000\) and \(x_1=(0.30)(0.40)=0.1200\).
  • For \(\theta=2\), \(x_0\approx0.05538\) and \(x_1\approx0.1554\).

For example, at \(\theta=2\),

$$ E[Y(1,M(0))]=0.10-0.05538+0.1554=0.2000. $$

Repeating the same calculation for each value gives \(E[Y(1,M(0))]\approx0.1603\) at \(\theta=0.5\), \(0.1800\) at \(\theta=1\), and \(0.2000\) at \(\theta=2\). Define the natural direct effect at the mediator level under treatment 0 and the natural indirect effect under treatment 1 on the risk-difference scale:

$$ \text{NDE}=E[Y(1,M(0))]-E[Y(0,M(0))], \qquad \text{NIE}=E[Y(1,M(1))]-E[Y(1,M(0))]. $$

Here \(E[Y(0,M(0))]=E[Y(0)]=0.128\) and \(E[Y(1,M(1))]=E[Y(1)]=0.220\). The resulting effects are:

Cross-world \(\theta\)\(E[Y(1,M(0))]\)NDE (risk difference)NIE (risk difference)
0.50.16030.032340.05966
10.18000.052000.04000
20.20000.072000.02000

For instance, at \(\theta=2\), the estimated NDE is a 0.072 risk difference, or 7.2 percentage points, and the NIE is a 0.020 risk difference, or 2.0 percentage points. These are hypothetical population calculations, not results from a real study.

How to Read a Sensitivity Analysis

In this example, both natural effects are positive at all three examined values. Therefore, the signs of the effects are robust across this particular range, from an odds ratio of 0.5 to 2. But their relative sizes are not robust: at \(\theta=0.5\), the NIE is larger than the NDE; at \(\theta=2\), the NDE is larger. A report should distinguish these conclusions rather than describing the effect decomposition as unchanged.

The chosen range is a substantive judgment, not a range learned from the observed data. Investigators should explain why the examined values are plausible, report the effects across the range, and identify where the sign or other key conclusion changes if it does. The odds ratio is a scale-specific measure: the same value does not represent the same risk difference at every pair of margins. It is also important not to infer that a larger \(\theta\) must always increase a natural effect. The effect depends on how the joint probabilities for the different mediator levels combine.

Key takeaway: Sensitivity analysis for cross-world assumptions holds the identified marginal risks fixed, specifies possible dependence between counterfactuals, and recalculates the natural effects. Robustness is a conclusion about the stated sensitivity range, not proof that the cross-world assumption is true.

Common Mistakes

  • Treating \(\theta\) as data-estimated. The cross-world joint distribution is unobserved, so this sensitivity parameter is specified rather than identified from the observed data.
  • Using an infeasible joint probability. A solution must satisfy \(\max(0,p+r-1)\leq x\leq\min(p,r)\); a mathematical root outside those bounds is not a valid probability.
  • Calling the sensitivity range a confidence interval. A range of estimates across chosen dependence values reflects sensitivity to an assumption, not sampling uncertainty. Statistical uncertainty requires separate analysis.
  • Overstating robustness. If an effect keeps its sign only for the values examined, say so. Do not claim robustness to every possible departure from independence.
  • Interpreting cross-world association causally. \(\theta\) describes association between counterfactual quantities; it does not say that one counterfactual causes the other.

Check Your Understanding

Use the definitions and calculations above to answer the following.

  1. What does \(\theta=1\) mean for \(Y(a,m)\) and \(M(a')\), and why can the data not generally establish this value?
  2. If \(p=0.20\), \(r=0.30\), and \(x=0.10\), calculate the other three cells of the joint distribution and check whether \(x\) is feasible.
  3. In the worked example, why does changing \(\theta\) alter both the NDE and NIE while leaving \(E[Y(0)]\) and \(E[Y(1)]\) unchanged?
  4. Which conclusion in the worked example is robust over \(\theta=0.5,1,2\), and which comparison is not robust?
  5. Explain why a sensitivity range is not a confidence interval for a natural effect.
Clinical Biostats