TITLE:
  Eq 11a.1: Empty Means, Levels 1 and 3 Model Predicting Class Emotional Support
  Level-1 Ocasions Within Level-3 Classes

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

VARIABLE:
  NAMES = ClassID grade size StudID girl SMclose SMvic CMclose CMvic CMg CMemo
          size23 grade35 CMg50 CMemo5 CMvic3 WCclose SMvic3 WCvic wave emo vic close
          time1 time2 w3 WSclose vic3 WSvic emo5 WCemo;
  USEVARIABLES = emo;
  MISSING = ALL (-9999);
  CLUSTER = ClassID StudID;

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

MODEL:

%WITHIN%
  emo;

%BETWEEN StudID%
  emo@0;

%BETWEEN ClassID%
  [emo];
  emo;