TITLE:
  Eq 8.1: Conditional Baseline Model
  Just Sex and Age in the Model for the Means

DATA:
  ! Prior necessary data manipulation conducted using other programs
  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 sexage;
  MISSING = ALL (-9999);
  CLUSTER = PersonID;
  BETWEEN = women age80 sexage;

ANALYSIS:
  ESTIMATOR = ML;
  PROCESSORS = 4;
  TYPE = TWOLEVEL RANDOM;

MODEL:

%WITHIN%
  symp;

%BETWEEN%
  [symp];
  symp;
  symp ON women age80 sexage (bwomen bage80 bsexage);