TITLE:
  Ch 7b: Saturated Means by Rounded Occasion, Unstructured Variance Model

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

DATA LONGTOWIDE:
  LONG = risky;
  WIDE = risky12-risky18;
  IDVARIABLE = PersonID;
  REPETITION = occasion (12-18);

VARIABLE:
  NAMES = PersonID att12 copymon18 occasion age risky monitor agec18 att4;
  USEVARIABLES = risky12-risky18;
  MISSING = ALL (-9999);

ANALYSIS:
  ESTIMATOR = ML;
  PROCESSORS = 4;

OUTPUT:
  STDYX;

MODEL:
  risky12-risky18 (totvar12-totvar18);
  risky12-risky18 WITH risky12-risky18 (totcov1-totcov21);
  [risky12-risky18] (mean12-mean18);