TITLE:
Eq 8.11: Adding 4 Sex*Negative Mood and Sex*Stressors Interactions 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;
sexPMm = women*PMmood2;
sexPMs = women*PMstr40;
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 sexPMm sexPMs;
MISSING = ALL (-9999);
CLUSTER = PersonID;
WITHIN = WPmood stress;
BETWEEN = women age80 PMmood2 PMstr40 sexage sexPMm sexPMs;
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);
symp ON sexPMm sexPMs (bsexPMm bsexPMs);
L1mood L1str ON women (bsexL1m bsexL1s);
MODEL TEST:
0=bsexPMm;
0=bsexPMs;
0=bsexL1m;
0=bsexL1s;
MODEL CONSTRAINT:
NEW(est1-est25);
est1 = int*1 + bwomen*0;
est2 = int*1 + bwomen*1;
est3 = bwomen*1;
est4 = bage80*1 + bsexage*0;
est5 = bage80*1 + bsexage*1;
est6 = bsexage*1;
est7 = 1*bPMmood2 + 0*bsexPMm;
est8 = 1*bPMmood2 + 1*bsexPMm;
est9 = 1*bsexPMm;
est10 = -1*bWPmood + 0*bsexL1m + 1*bPMmood2 + 0*bsexPMm;
est11 = -1*bWPmood - 1*bsexL1m + 1*bPMmood2 + 1*bsexPMm;
est12 = -1*bsexL1m + 1*bsexPMm;
est13 = 1*bWPmood + 0*bsexL1m;
est14 = 1*bWPmood + 1*bsexL1m;
est15 = 1*bsexL1m;
est16 = bstress*1 + bsexL1s*0 + bPMstr40*1 + bsexPMs*0;
est17 = bstress*1 + bsexL1s*1 + bPMstr40*1 + bsexPMs*1;
est18 = bsexL1s*1 + bsexPMs*1;
est19 = bPMstr40*1 + bsexPMs*0;
est20 = bPMstr40*1 + bsexPMs*1;
est21 = bsexPMs*1;
est22 = bstress*1 + bsexL1s*0;
est23 = bstress*1 + bsexL1s*1;
est24 = bsexL1s*1;
est25 = bPMstr40*.2;