<div dir="ltr">Dear Fan,<div><br></div><div> Our mediation effect is on the same scale as the outcome variable, which means that you cannot simply compare it with the coefficients from a logistic regression. You might want to check out our American Political Science Review or Psychological Methods articles, which explain this. The papers are available at: <a href="http://imai.princeton.edu/projects/mechanisms.html">http://imai.princeton.edu/projects/mechanisms.html</a></div><div><br></div><div> In addition, because of non-linearity, there will be some discrepancies between alternative modeling strategies. For example, if you model M given T as a logistic regression and Y given M and T as another logistic regression, it follows that Y given T is NOT a logistic regression. Hopefully, your results are strong enough not to be dependent on this kind of model choice. </div><div><br></div><div> Multiple mediators are quite tricky but we did write a paper that proposes one approach to deal with this problem. Have a look at the Political Analysis paper on the aforementioned webpage to see if the method proposed in that paper (which is implemented in the package) are applicable in your setting.</div><div><br></div><div>Best,</div><div>Kosuke</div><div><br></div><div>---------------------------------------------------------<br>Kosuke Imai Office: Corwin Hall 036<br>Professor Phone: 609-258-6601<br>Department of Politics Fax: 609-258-1110<br>Princeton University Email: kimai@Princeton.Edu<br>Princeton, NJ 08544-1012 <a href="http://imai.princeton.edu">http://imai.princeton.edu</a><br>---------------------------------------------------------<br><br></div><div class="gmail_extra"><div><div class="gmail_signature"><div dir="ltr"></div></div></div>
<br><div class="gmail_quote">On Tue, Jan 20, 2015 at 10:56 AM, Fan He <span dir="ltr"><<a href="mailto:FHe@phs.psu.edu" target="_blank">FHe@phs.psu.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div lang="EN-US" link="blue" vlink="purple">
<div>
<p class="MsoNormal">Dear Dr. Imai,<u></u><u></u></p>
<p class="MsoNormal">This is Fan He, an investigator in the Penn State University College of Medicine. Recently, I was trying to do some mediation analyses with your “Mediation” package for R, which is very user-friendly and productive.<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">However, there are some difficulties when I applying the package on binary outcome variables. Specifically, the “Total Effect” that generated from the R package is dramatically different from the one from traditional regression models (e.g.
logistic regression).<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">To illustrate the problem, I did a simulation, in which the effect of “T” on “y” was partially through “M”, with the following codes and results:<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">n = 2000<u></u><u></u></p>
<p class="MsoNormal">T = rbinom(n, 1, .5)<u></u><u></u></p>
<p class="MsoNormal">M = 1.5 + 5*T + rnorm(n) <u></u><u></u></p>
<p class="MsoNormal">pi1 = .5 + .3*(M - mean(M)) + .5*T<u></u><u></u></p>
<p class="MsoNormal">pi1 = exp(pi1)/(1+exp(pi1))<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">y = rbinom(n, 1, pi1)<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">model1 = glm(y~T, family=binomial)<u></u><u></u></p>
<p class="MsoNormal">summary(model1)<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal" style="word-break:break-all"><span style="font-size:10.0pt;font-family:"Lucida Console";color:black;background:#e1e2e5">Coefficients:<u></u><u></u></span></p>
<p class="MsoNormal" style="word-break:break-all"><span style="font-size:10.0pt;font-family:"Lucida Console";color:black;background:#e1e2e5"> Estimate Std. Error z value Pr(>|z|)
<u></u><u></u></span></p>
<p class="MsoNormal" style="word-break:break-all"><span style="font-size:10.0pt;font-family:"Lucida Console";color:black;background:#e1e2e5">(Intercept) -0.37086 0.06566 -5.648 1.62e-08 ***<u></u><u></u></span></p>
<p class="MsoNormal" style="word-break:break-all"><span style="font-size:10.0pt;font-family:"Lucida Console";color:black;background:yellow">T 2.05362</span><span style="font-size:10.0pt;font-family:"Lucida Console";color:black;background:#e1e2e5">
0.10764 19.078 < 2e-16 ***<u></u><u></u></span></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">As expected, the regression coefficient from the above logistic regression model for “T” was around 2.<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">med.fit <- lm(M ~ T) <u></u><u></u></p>
<p class="MsoNormal">out.fit <- glm(y ~ T + M, family=binomial("probit"))<u></u><u></u></p>
<p class="MsoNormal">med.out <- mediate(med.fit, out.fit, boot = TRUE, treat = "T", mediator = "M", sims = 500)<u></u><u></u></p>
<p class="MsoNormal">summary(med.out)<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<pre style="word-break:break-all"><span style="font-family:"Lucida Console";color:black;background:#e1e2e5"> Estimate 95% CI Lower 95% CI Upper p-value<u></u><u></u></span></pre>
<pre style="word-break:break-all"><span style="font-family:"Lucida Console";color:black;background:#e1e2e5">ACME (control) 0.35569 0.25187 0.43794 0.00<u></u><u></u></span></pre>
<pre style="word-break:break-all"><span style="font-family:"Lucida Console";color:black;background:#e1e2e5">ACME (treated) 0.32105 0.20176 0.44693 0.00<u></u><u></u></span></pre>
<pre style="word-break:break-all"><span style="font-family:"Lucida Console";color:black;background:#e1e2e5">ADE (control) 0.11286 -0.01480 0.23602 0.07<u></u><u></u></span></pre>
<pre style="word-break:break-all"><span style="font-family:"Lucida Console";color:black;background:#e1e2e5">ADE (treated) 0.07823 -0.00951 0.18292 0.07<u></u><u></u></span></pre>
<pre style="word-break:break-all"><span style="font-family:"Lucida Console";color:black;background:yellow">Total Effect 0.43391</span><span style="font-family:"Lucida Console";color:black;background:#e1e2e5"> 0.39841 0.47005 0.00<u></u><u></u></span></pre>
<pre style="word-break:break-all"><span style="font-family:"Lucida Console";color:black;background:#e1e2e5">Prop. Mediated (control) 0.81972 0.58100 1.02256 0.00<u></u><u></u></span></pre>
<pre style="word-break:break-all"><span style="font-family:"Lucida Console";color:black;background:#e1e2e5">Prop. Mediated (treated) 0.73990 0.46773 1.03514 0.00<u></u><u></u></span></pre>
<pre style="word-break:break-all"><span style="font-family:"Lucida Console";color:black;background:#e1e2e5">ACME (average) 0.33837 0.22614 0.44451 0.00<u></u><u></u></span></pre>
<pre style="word-break:break-all"><span style="font-family:"Lucida Console";color:black;background:#e1e2e5">ADE (average) 0.09554 -0.01216 0.20802 0.07<u></u><u></u></span></pre>
<pre style="word-break:break-all"><span style="font-family:"Lucida Console";color:black;background:yellow">Prop. Mediated (average) 0.77981</span><span style="font-family:"Lucida Console";color:black;background:#e1e2e5"> 0.52695 1.02885 0.00<u></u><u></u></span></pre>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Although the proportion of the effect that explained by the mediator is reasonable (close to 0.75), the “Total Effect” from the mediation model was substantially smaller than 2. Could you help me solve the problem?<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Besides, would the package be able to handle two or more inter-related mediators and calculate the mediation effect for each of them?<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">I read your paper that you have the “multimed” function for two causally-related mediators, in which you have a “primary mediator” and an “alternative mediator”. But it doesn’t calculate the mediation effect for the two mediators separately.<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Your help will be greatly appreciated.<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Thanks,<u></u><u></u></p>
<p class="MsoNormal">Fan<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal"><span style="color:#1f497d">Fan He M.S.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="color:#1f497d">Department of Public Health Sciences<u></u><u></u></span></p>
<p class="MsoNormal"><span style="color:#1f497d">Penn State University College of Medicine<u></u><u></u></span></p>
<p class="MsoNormal"><span style="color:#1f497d">90 Hope Dr. Suite 2200, A210<u></u><u></u></span></p>
<p class="MsoNormal"><span style="color:#1f497d">Hershey, PA 17033<u></u><u></u></span></p>
<p class="MsoNormal"><span style="color:#1f497d">E-mail: <a href="mailto:fhe@phs.psu.edu" target="_blank">
<span style="color:#1f497d">fhe@phs.psu.edu</span></a><u></u><u></u></span></p>
<p class="MsoNormal"><span style="color:#1f497d">Tel: <a href="tel:717-531-1172" value="+17175311172" target="_blank">717-531-1172</a> Fax: <a href="tel:717-531-5779" value="+17175315779" target="_blank">717-531-5779</a><u></u><u></u></span></p>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
</div>
</blockquote></div><br></div></div>