Hi Patrick-<div>We currently do not include this functionality (interaction of mediation effect with a pre-treatment covariate). It is at the top of our list, thought. While not ideal, one can subset the data by the pre-treatment variable that you think is moderating the mediation. But that is a short term solution.</div>

<div><br></div><div>We&#39;d love to hear examples/obtain data examples from you on this (beyond those papers which we are aware of). Can you please let us know where you go with this? When we adapt the program, it would be nice to benchmark this against what others provide.</div>

<div><br></div><div>thanks,</div><div>Dustin</div><div><br></div><div>Dustin Tingley<br>Government Department<br>Harvard University<br><a href="http://scholar.harvard.edu/dtingley" target="_blank">http://scholar.harvard.edu/dtingley</a><br>

<br>
<br><br><div class="gmail_quote">On Tue, Nov 8, 2011 at 9:29 PM, Kosuke Imai <span dir="ltr">&lt;<a href="mailto:kimai@princeton.edu">kimai@princeton.edu</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

Dear Patrick,<br>
<br>
  Thanks for your email.  I think mediate() will accommodate the treatment-mediator interaction but the current version may not handle the moderated mediation effects.  I&#39;m ccing my coauthors to make sure that my answer is correct.  We hope to include this functionality in the near future though.  If interested, please subscribe to our mailing list where we announce the updates of the software and other relevant information.  <a href="https://r-forge.r-project.org/projects/mediation/" target="_blank">https://r-forge.r-project.org/projects/mediation/</a><br>


<br>
Best,<br>
Kosuke<br>
<br>
Department of Politics<br>
Princeton University<br>
<a href="http://imai.princeton.edu" target="_blank">http://imai.princeton.edu</a><br>
<br>
On Nov 8, 2011, at 1:16 PM, Patrick S Forscher wrote:<br>
<br>
&gt; Hi Dr. Imai,<br>
&gt;<br>
&gt; My name is Patrick Forscher, and I am the lab instructor for a data analysis course in the UW-Madison Psychology Department.  The instructor of record, Markus Brauer, and I are teaching the course in R.  We have used your the mediate() function in the mediation package to demonstrate how to test for simple mediation (a la Baron &amp; Kenny, 1986).  However, we&#39;d also like to teach the students to test for moderated mediation (when a mediation effect varies across levels of a third variable; Preacher, Rucker, &amp; Hayes, 2007) and mediated moderation (when a variable provides the causal mechanism through which an interaction exerts its effect on a dependent variable; Muller, Judd, &amp; Yzerbyt, 2005).  Is the mediate() function able to test for moderated mediation or mediated moderation?  If not, would you be able to recommend a package that can test for these cases?<br>


&gt;<br>
&gt; Thanks for your time and advice!<br>
<span class="HOEnZb"><font color="#888888">&gt;<br>
&gt; --<br>
&gt; Patrick S Forscher<br>
&gt; University of Wisconsin-Madison<br>
<br>
</font></span></blockquote></div><br></div>