TITLE:
Ch 8: Checking Inter-Variable Interactions via GMC Negative Mood by GMC Stressors
DATA:
FILE = MPLUS_Chapter8.csv;
FORMAT = FREE;
DEFINE:
sexage = women*age80;
sexPMs = women*PMstr40;
PMmPMs = PMmood2*PMstr40;
m2str = mood2*stress;
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 mood2 stress PMstr40 sexage sexPMs
PMmPMs m2str;
MISSING = ALL (-9999);
CLUSTER = PersonID;
WITHIN = mood2 stress m2str;
BETWEEN = women age80 PMmood2 PMstr40 sexage sexPMs PMmPMs;
ANALYSIS:
ESTIMATOR = ML;
PROCESSORS = 4;
TYPE = TWOLEVEL RANDOM;
MODEL:
%WITHIN%
symp;
L1mood | symp ON mood2;
L1str | symp ON stress;
L1mL1s | symp ON m2str;
%BETWEEN%
[symp L1mood L1str L1mL1s] (int bmood2 bstress bm2str);
symp L1mood@0 L1str@0 L1mL1s@0;
symp ON women age80 sexage (bwomen bage80 bsexage);
symp ON PMmood2 PMstr40 (bPMmood2 bPMstr40);
symp ON sexPMs PMmPMs (bsexPMs bPMmPMs);
L1mood ON PMstr40 (bL1mPMs);
L1str ON women PMmood2 (bsexL1s bPMmL1s);
MODEL CONSTRAINT:
NEW(est1-est9);
est1 = bL1mPMs*1 + bPMmPMs*1 + bPMmL1s*1 + bm2str*1;
est2 = bL1mPMs*1 + bPMmPMs*1;
est3 = bPMmL1s*1 + bm2str*1;
est4 = bPMmL1s*1 + bPMmPMs*1;
est5 = bPMmPMs*1;
est6 = bPMmL1s*1;
est7 = bL1mPMs*1 + bm2str*1;
est8 = bL1mPMs*1;
est9 = bm2str*1;