1-1-1 Mediation analysis Deconflated ... PreviousNext
Mplus Discussion > Multilevel Data/Complex Sample >
Message/Author
 Olaya Moldes posted on Friday, October 16, 2015 - 8:04 am
I'm using Hayes syntax to create a deconflated model: http://www.afhayes.com/public/aps2013.pdf

DATA: FILE IS SimplifiedMResData.dat;
VARIABLE: NAMES ARE Part
Happy EmoReg TypeC GMEmo GMEffec GMDisc GMSelf GMConti GMRel GMType;

USEVARIABLES ARE
Part TypeC Happy EmoReg GMEmo GMType;
missing are all (-999);
CLUSTER IS Part;
within are TypeC EmoReg;
between are GMType GMEmo;
centering is groupmean (TypeC EmoReg);

ANALYSIS: TYPE IS TWOLEVEL RANDOM;
MODEL:

%WITHIN%
s_a|EmoReg ON TypeC;
s_b|Happy ON EmoReg;
s_cp|Happy ON TypeC;
[EmoReg@0];
[TypeC@0];
%BETWEEN%
Happy on GMEmo GMType;
[s_a](a);
[s_b](b);
[s_cp](cp);
Happy with s_a s_b s_cp;
s_a with s_b (covab);
s_a with s_cp;
s_b with s_cp;
MODEL CONSTRAINT:
NEW (direct indirect);
indirect = a*b + covab;
direct = cp;
I get the following error message:
Variable on the left-hand side of an ON statement in a | statement is a
WITHIN variable. The intercept for this variable is not random.

Any suggestions?
 Bengt O. Muthen posted on Friday, October 16, 2015 - 12:04 pm
You have declared EmoReg as a Within variable, but specify

%WITHIN%
s_a|EmoReg ON TypeC;

which is contradictory because if there is a random slope, EmoReg varies across clusters.
 Olaya Moldes posted on Monday, October 19, 2015 - 3:27 am
Thanks for you answer!
Since I've copied the syntax from Hayes and he seems to use the same syntax across examples, I was wondering if anyone would be able to help me to fix the error.
How can I calculate path (a) but keeping EmoReg as a level 1 variable that need to be centered?

Thanks so much!
 Bengt O. Muthen posted on Monday, October 19, 2015 - 2:04 pm
Would you want to simply make it a fixed effect:

%WITHIN%
EmoReg ON TypeC (a);
Back to top
Add Your Message Here
Post:
Username: Posting Information:
This is a private posting area. Only registered users and moderators may post messages here.
Password:
Options: Enable HTML code in message
Automatically activate URLs in message
Action: