TITLE:
Eq 8.5: Adding Smushed Effect of Negative Mood to the Model for the Means
Using Grand-Mean-Centering for Negative Mood
DATA:
FILE = MPLUS_Chapter8.csv;
FORMAT = FREE;
DEFINE:
sexage = women*age80;
VARIABLE:
NAMES = PersonID women baseage session studyday dayweek weekend symp mood stress
PMmood PMstr age80 mood2 WPmood PMmood2 WPstr PMstr40;
USEVARIABLES = symp women age80 mood2 sexage;
MISSING = ALL (-9999);
CLUSTER = PersonID;
WITHIN = mood2;
BETWEEN = women age80 sexage;
ANALYSIS:
ESTIMATOR = ML;
PROCESSORS = 4;
TYPE = TWOLEVEL RANDOM;
MODEL:
%WITHIN%
symp;
smush | symp ON mood2;
%BETWEEN%
[symp smush] (int bmood2);
symp smush@0;
symp ON women age80 sexage (bwomen bage80 bsexage);
MODEL CONSTRAINT:
NEW(est1-est2);
est1 = bage80*1 + bsexage*0;
est2 = bage80*1 + bsexage*1;