TITLE:
  Eq 8.11reduced: Adding Only 2 Sex*Stressors Interactions to the Model for the Means
  Using Person-Mean-Centering for Negative Mood, Grand-Mean-Centering for Stressors

DATA:
  ! Prior necessary data manipulation conducted using other programs
  FILE = MPLUS_Chapter8.csv;
  FORMAT = FREE;

DEFINE:
  sexage = women*age80;
  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 sexPMs;
  MISSING = ALL (-9999);
  CLUSTER = PersonID;
  WITHIN = WPmood stress;
  BETWEEN = women age80 PMmood2 PMstr40 sexage 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 sexPMs (bsexPMs);
  L1str ON women (bsexL1s);

MODEL TEST:
  ! Multivariate Test of 2 Sex Interactions
  0=bsexPMs;
  0=bsexL1s;