I'm working with the "mediation" package for simulation-based causal mediation analysis.

My question is: Why do percentile-bootstrapped CIs for the proportion mediated sometimes include impossible values?

Here is an example reproduced from the package authors' J Stat Soft paper (page 7) [1]:


# model expected values for mediator and outcome
med.fit <- lm(emo ~ treat + age + educ + gender + income, data = framing)
out.fit <- glm(cong_mesg ~ emo + treat + age + educ + gender + income,
           data = framing, family = binomial("probit"))

med.out <- mediate(med.fit, out.fit, treat = "treat",
           mediator = "emo", boot=TRUE, sims = 100)


Causal Mediation Analysis 

Nonparametric Bootstrap Confidence Intervals with the Percentile Method

                         Estimate 95% CI Lower
ACME (control)             0.0848       0.0406
ACME (treated)             0.0858       0.0372
ADE (control)              0.0116      -0.1137
ADE (treated)              0.0127      -0.1252
Total Effect               0.0975      -0.0593
Prop. Mediated (control)   0.8697      -2.5991
Prop. Mediated (treated)   0.8805      -2.3143
ACME (average)             0.0853       0.0386
ADE (average)              0.0122      -0.1201
Prop. Mediated (average)   0.8751      -2.4537
                         95% CI Upper p-value
ACME (control)                 0.1302    0.00
ACME (treated)                 0.1327    0.00
ADE (control)                  0.1272    0.88
ADE (treated)                  0.1361    0.88
Total Effect                   0.2040    0.22
Prop. Mediated (control)       3.7688    0.22
Prop. Mediated (treated)       3.5059    0.22
ACME (average)                 0.1314    0.00
ADE (average)                  0.1317    0.88
Prop. Mediated (average)       3.6374    0.22

Sample Size Used: 265 

Simulations: 100

Note that the proportion mediated (regardless of standardization to the control, treated, or whole sample) has CI limits for the proportion mediated falling outside [-1, 1]. (Negative values are fine here because the package reports a negative proportion when the sign of ACME is opposite that of the total effect.)

Since I asked for a percentile bootstrap, my understanding is that the package should simply be computing the proportion mediated as ADE / (ADE + ACME) for each sample and then using percentiles for the CI limits. But given the out-of-bound CI limits, this appears not to be the case.


[1] Tingley, D., Yamamoto, T., Hirose, K., Keele, L., & Imai, K. (2014). Mediation: R package for causal mediation analysis.

  • $\begingroup$ I have the same question - did you happen find an answer? I see this question was posted a few years ago, but do not see any responses. $\endgroup$ – Sam T Jan 10 at 23:21
  • $\begingroup$ Yes. Strangely, I had answered the question myself and then moderators deleted it because it "did not answer the question". Anyway, the answer was: "This happens if ADE and ACME have opposite signs. Then the "proportion" is outside [0,1]." $\endgroup$ – half-pass Jan 12 at 0:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.