I am running a series of mediation analyses in R
using the mediation package and the following code:
m_1 <- gam(mediator1 ~ age_cat + s(treat, k = 50, bs = "cr") +
cov1 + cov2 + cov3 + cov4 + year, data = mediation_df,
method = "REML")
y_1 <- gam(dem_important ~ age_cat + mediator1 +
s(treat,k = 50, bs = "cr") + cov1 + cov2 + cov3 + cov4 +
year, data = mediation_df, method = "REML")
results1 <- mediate(m_1, y_1, sims = 1000, boot = TRUE,
treat = "treat", mediator = "mediator1")
m_2 <- gam(mediator2 ~ age_cat + s(treat, k = 50, bs = "cr") +
cov1 + cov2 + cov3 + cov4 + year, data = mediation_df,
method = "REML")
y_2 <- gam(dem_important ~ age_cat + mediator2 +
s(treat, k = 50, bs = "cr") + cov1 + cov2 + cov3 +
cov4 + year, data = mediation_df, method = "REML")
results1 <- mediate(m_2, y_2, sims = 1000, boot = TRUE,
treat = "treat", mediator = "mediator1")
m_3 <- gam(mediator3 ~ age_cat + s(treat, k = 50, bs = "cr") +
cov1 + cov2 + cov3 + cov4 + year, data = mediation_df,
method = "REML")
y_3 <- gam(dem_important ~ age_cat + mediator3 +
s(treat, k = 50, bs = "cr") + cov1 + cov2 +
cov3 + cov4 + year, data = mediation_df, method = "REML")
results3 <- mediate(m_3, y_3, sims = 1000, boot = TRUE,
treat = "treat", mediator = "mediator3")
I receive the following results:
summary(results1)
summary(results2)
summary(results3)
Causal Mediation Analysis
Nonparametric Bootstrap Confidence Intervals with the Percentile Method
Estimate 95% CI Lower 95% CI Upper p-value
ACME -0.000691 -0.001773 0.00 0.038 *
ADE -0.002030 -0.003628 0.00 0.232
Total Effect -0.002721 -0.004609 0.00 0.176
Prop. Mediated 0.253953 -0.939163 1.21 0.182
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Sample Size Used: 3230
Simulations: 1000
Causal Mediation Analysis
Nonparametric Bootstrap Confidence Intervals with the Percentile Method
Estimate 95% CI Lower 95% CI Upper p-value
ACME -0.000253 -0.000612 0.00 0.18
ADE -0.002058 -0.003715 0.00 0.13
Total Effect -0.002311 -0.003951 0.00 0.12
Prop. Mediated 0.109508 -0.331097 0.52 0.28
Sample Size Used: 3230
Simulations: 1000
Causal Mediation Analysis
Nonparametric Bootstrap Confidence Intervals with the Percentile Method
Estimate 95% CI Lower 95% CI Upper p-value
ACME -0.000334 -0.003641 0.00 0.37
ADE -0.002725 -0.004098 0.01 0.36
Total Effect -0.003059 -0.006020 0.01 0.28
Prop. Mediated 0.109084 -1.115058 1.36 0.53
Sample Size Used: 3230
Simulations: 1000
I am hoping to compare these different models and compare the mediation effects of each mediator. In regression one, I get a significant effect for the ACME, and 25% mediated, much more than the other two mediators. However, that proportion mediated is not significant, nor are the other models' ACMEs. I know that other posts have explained how Indirect effects can be signfiicant while the Direct effect is insignificant, but I have not seen this scenario.
How can a significant ACME be found but the proportion mediated is not? Can my results be trusted at all or can the effect not be concluded? Furthermore, can I make a legitimate comparison of the different mediators? Can I say that the mediator in model 1 has a stronger mediation effect than the other models, based on the higher proportion mediated.
Is this all caused by a power issue? Is it something to do with the number of iterations in the MCMC?
Additionally:
For the final model, I also receive the following warning:
Running nonparametric bootstrap
Warning: Fitting terminated with step failure - check results carefully
What do I infer from this warning? Can my results be trusted, or how can I check this?