Message/Author |
|
|
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? |
|
|
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. |
|
|
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! |
|
|
Would you want to simply make it a fixed effect: %WITHIN% EmoReg ON TypeC (a); |
|
Back to top |