TITLE:
Eq 8.3: Adding BP and WP Effects of Negative Mood to the Model for the Means
Using Person-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 PMmood2 WPmood sexage;
MISSING = ALL (-9999);
CLUSTER = PersonID;
WITHIN = WPmood;
BETWEEN = women age80 PMmood2 sexage;
ANALYSIS:
ESTIMATOR = ML;
PROCESSORS = 4;
TYPE = TWOLEVEL RANDOM;
MODEL:
%WITHIN%
symp;
L1mood | symp ON WPmood;
%BETWEEN%
[symp L1mood] (int bWPmood);
symp L1mood@0;
symp ON women age80 sexage (bwomen bage80 bsexage);
symp ON PMmood2 (bPMmood2);
MODEL TEST:
0=bPMmood2;
0=bWPmood;
MODEL CONSTRAINT:
NEW(est1-est13);
est1 = bage80*1 + bsexage*0;
est2 = bage80*1 + bsexage*1;
est3 = -1*bWPmood + 1*bPMmood2;
est4 = int*1 + bPMmood2*0 - bWPmood*1;
est5 = int*1 + bPMmood2*0 + bWPmood*0;
est6 = int*1 + bPMmood2*0 + bWPmood*1;
est7 = int*1 + bPMmood2*1 - bWPmood*1;
est8 = int*1 + bPMmood2*1 + bWPmood*0;
est9 = int*1 + bPMmood2*1 + bWPmood*1;
est10 = int*1 - bPMmood2*1 + bWPmood*0;
est11 = int*1 + bPMmood2*0 + bWPmood*0;
est12 = int*1 + bPMmood2*1 + bWPmood*0;
est13 = int*1 + bPMmood2*2 + bWPmood*0;