Moderated Mediation with cross level ...
Message/Author
 Johnna Capitano posted on Wednesday, March 19, 2014 - 6:09 am
We did an experience sampling study and collected data from 54 people three times a day for five working days (repeated measures design: daily measures are nested in individuals). We are trying to test a moderated mediation model with:
Daily events (x1-x4) --> triggering daily recovery (mediator)(m) --> influencing daily home affect (y) (Lower Level Mediation). The moderator is Level 2 (number of children living at home)(w).
Is it possible to test such a cross level moderated mediation model with Mplus and how could I perform the analysis? Thank you so much!
 Bengt O. Muthen posted on Wednesday, March 19, 2014 - 4:18 pm
Yes, it is possible. See

Preacher, K., Zyphur, M. & Zhang, Z. (2010). A general multilevel SEM framework for assessing multilevel mediation. Psychological Methods, 15, 209-233.
 Johnna Capitano posted on Wednesday, March 19, 2014 - 7:07 pm
Bengt,
Thank you for the reference, but I didn't see any mention of moderated mediation. Also, I believe that moderated mediation with a L2 moderator and 1-1-1 mediation is possible, but I don't know how to develop the syntax in Mplus. I have tried numerous combinations of models, but the only one that will run is one that specifies all the variables as within (even though my moderator is actually L2, between). So I am looking for help with the syntax - apologies for not being clear earlier.

Johnna
 Bengt O. Muthen posted on Thursday, March 20, 2014 - 7:29 am
Have you tried

Within: specify random slopes to be moderated

Between: regress those slopes on the continuous Between-level moderator
 Johnna Capitano posted on Sunday, March 23, 2014 - 11:14 am
Bengt,

Thank you again. I am not clear what this would look like in terms of Mplus syntax but will continue to work on it.
 Bengt O. Muthen posted on Sunday, March 23, 2014 - 12:54 pm
Moderation of m on x would be like

%within%
y on m x;
s | m on x;

%between%
s on w;

where s is the random slope and w is the between-level moderator. I am just giving parts of the Model statement to give you an idea.
 Simone Kauffeld posted on Wednesday, December 20, 2017 - 12:47 am
Dear Linda and Bengt,

I hope this thread is the correct one for my question.

I have a question regarding multilevel modeling with repeated measures and would be very grateful for some help.

I have a repeated measures design with three within variables (response; negative affect; index) and one between variable (TheoX). Each participant was presented with two vignettes (=index) in a randomized order and we measured their response (=response) and their affect (=negative affect) to each of the two vignettes. Furthermore, we measured their leader mindset (=TheoX) once.

What I would like to do in MPLUS is run a moderated mediation (moderator on IV-Mediator path and on DV-IV path) with that repeated measures design. I think the code for Model 8 is the appropriate one, but my question is how to adjust the syntax in a way that it includes the fact that I have a repeated measures design. How/where in the syntax model do I need to define within an between?

Best regards,

Simone
 Bengt O. Muthen posted on Wednesday, December 20, 2017 - 12:23 pm
If I understand you correctly, it seems like you can use Cluster = leader and Between=TheoX in the Variable command.
 Simone Kauffeld posted on Thursday, December 21, 2017 - 7:43 am
Dear Bengt,
thank you very much for your quick reply. So first I tried to run Model 7 and added ID(i.e., leader) in the syntax. May I ask, if the syntax looks correct in your opinion?

Have a nice holiday season!

missing = all(99);
cluster = ID;
WITHIN = Response NegAff Index;
BETWEEN = TheoX;

ANALYSIS:
TYPE = TWOLEVEL RANDOM;

MODEL:
%WITHIN%

Response ON NegAff (b1);
Response ON Index (cdash);
s| NegAff ON Index;

%BETWEEN%

[s] (a1);

s on TheoX (a3);

MODEL CONSTRAINT:
NEW(LOW_TheoX MED_TheoX HIGH_TheoX IND_LOWW
IND_MEDW IND_HIW TOT_LOWW TOT_MEDW TOT_HIW);

LOW_TheoX = 1.78;
MED_TheoX= 3.05;
HIGH_TheoX = 4,32;

IND_LOWW = a1*b1 + a3*b1*LOW_TheoX;
IND_MEDW = a1*b1 + a3*b1*MED_TheoX;
IND_HIW = a1*b1 + a3*b1*HIGH_TheoX;

TOT_LOWW = IND_LOWW + cdash;
TOT_MEDW = IND_MEDW + cdash;
TOT_HIW = IND_HIW + cdash;

PLOT(LOMOD MEDMOD HIMOD);
LOOP(XVAL,1,5,0.1);
LOMOD = IND_LOWW*XVAL;
MEDMOD = IND_MEDW*XVAL;
HIMOD = IND_HIW*XVAL;

PLOT:
TYPE = plot2;

OUTPUT:
STAND CINT(bcbootstrap);
 Bengt O. Muthen posted on Thursday, December 21, 2017 - 3:26 pm
You have a logical inconsistency when you put Negaff on the Within list and at the same time say

s| NegAff ON Index;

because the latter implies that Negaff varies across clusters due to the random slope varying across clusters.

You can instead let Negaff not be on the Within or Between lists so that it is allowed to vary on both levels. A latent variable decomposition into within and between is then made - see description in the text of UG ex 9.1 and 9.2 (all parts).