TITLE:
Eq 8.10: Adding Contextual and WP Effects of Stressors to the Model for the Means
Using Person-Mean-Centering for Negative Mood, Grand-Mean-Centering for Stressors
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 stress PMstr40 sexage;
MISSING = ALL (-9999);
CLUSTER = PersonID;
WITHIN = WPmood stress;
BETWEEN = women age80 PMmood2 PMstr40 sexage;
ANALYSIS:
ESTIMATOR = ML;
PROCESSORS = 4;
TYPE = TWOLEVEL RANDOM;
MODEL:
%WITHIN%
symp;
L1mood | symp ON WPmood;
L1str | symp ON stress;
%BETWEEN%
[symp L1mood L1str] (int bWPmood bstress);
symp L1mood@0 L1str@0;
symp ON women age80 sexage (bwomen bage80 bsexage);
symp ON PMmood2 PMstr40 (bPMmood2 bPMstr40);
MODEL TEST:
0=bPMstr40;
0=bstress;
MODEL CONSTRAINT:
NEW(est1-est5);
est1 = int*1 + bwomen*1;
est2 = bage80*1 + bsexage*1;
est3 = -1*bWPmood + 1*bPMmood2;
est4 = 1*bstress + 1*bPMstr40;
est5 = 0.2*bPMmood2;