TITLE:
  Eq 8.13reduced: Baseline Homogeneous Variance Model with Significant Fixed Effects Only
  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;
  PMmsq = PMmood2*PMmood2;

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
                  PMmsq;
  MISSING = ALL (-9999);
  CLUSTER = PersonID;
  WITHIN = WPmood stress;
  BETWEEN = women age80 PMmood2 PMstr40 sexage sexPMs PMmsq;

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 PMmsq (bsexPMs bPMmsq);
  L1mood ON PMmood2 (bL1mPMm);
  L1str ON women (bsexL1s);