Message/Author |
|
Katie Smith posted on Thursday, December 08, 2016 - 10:30 am
|
|
|
Hello, My colleagues and I ran a 1-1-1 mediation model with fixed slopes using momentary data and the "I" Mplus syntax file (copied below). We would now like to add a binary level 2 moderator of the x-m pathway, but we cannot find the correct syntax to do so. Could you advise how to modify the "I" syntax to add this moderation effect? Thank you, Katie TITLE: 1-1-1 mediation (MSEM) DATA: FILE IS mydata.dat; ! VARIABLE: NAMES ARE id x m y; USEVARIABLES ARE id x m y; CLUSTER IS id; ANALYSIS: TYPE IS TWOLEVEL RANDOM; MODEL: %WITHIN% m ON x(aw); y ON m(bw); y ON x; %BETWEEN% x m y; m ON x(ab); y ON m(bb); y ON x; MODEL CONSTRAINT: NEW(indb indw); indw=aw*bw; indb=ab*bb; OUTPUT: TECH1 TECH8 CINTERVAL; |
|
|
Because your moderator is binary and Level-2 and x is latent on Level-2, I would recommend doing a 2-group analysis with groups defined by the moderator and where the (ab) parameter is allowed to vary across the groups. |
|
Katie Smith posted on Friday, December 09, 2016 - 7:21 am
|
|
|
Thank you very much. Just to clarify, do you advise that we separate the data by group and run the models separately in each data file? If so, could you clarify how the (ab) parameter can vary across the groups? |
|
|
No, I mean a simultaneous analysis of the 2 groups - in other words a single "2-group analysis". See the UG for multiple-group analysis examples. |
|
Katie Smith posted on Friday, December 09, 2016 - 12:00 pm
|
|
|
Thank you. We used the following syntax and used "Knownclass" based on example 7.21 in the user guide. However we received an error message that MPlus stopped running when we ran this syntax. Could you advise how to proceed? VARIABLE: NAMES ARE id group CRt2 NAt1 CRt1 NAt2 ; USEVARIABLES ARE group NAt1 CRt1 CRt2 NAt2 id ; CLASSES= GROUP(2); CLUSTER IS id; MISSING ARE ALL BLANK; KNOWNCLASS=GROUP (0= control 1=ED); ANALYSIS: TYPE IS TWOLEVEL RANDOM; MODEL: %WITHIN% CRt2 ON NAt1(aw) CRt1; NAt2 ON CRt2 (bw) CRT1; NAt2 ON NAt1; %BETWEEN% NAt1 CRt2 NAt2; CRt2 ON NAt1(ab) CRt1; NAt2 ON CRt2 (bb) CRt1; NAt2 ON NAt1;; MODEL CONSTRAINT: NEW (indb indw); indw=aw*bw; indb=ab*bb; MODEL control: %WITHIN% CRt2 ON NAt1(aw) CRt1; NAt2 ON CRt2 (bw) CRT1; NAt2 ON NAt1; %BETWEEN% NAt1 CRt2 NAt2; CRt2 ON NAt1(ab) CRt1; NAt2 ON CRt2 (bb) CRt1; NAt2 ON NAt1;; MODEL CONSTRAINT: NEW (indb indw); indw=aw*bw; indb=ab*bb; OUTPUT: TECH1 TECH8 CINTERVAL; |
|
|
Knownclass requires Type=Mixture. If this doesn't help send output to Support along with your license number. |
|
Back to top |