TITLE:
Ch 4: Empty Means, n-1 Lag Toeplitz R-Only Model
DATA:
FILE = MPLUS_Chapter4.csv;
FORMAT = FREE;
DATA LONGTOWIDE:
LONG = posmood;
WIDE = posmood1-posmood7;
IDVARIABLE = PersonID;
REPETITION = studyday (1-7);
VARIABLE:
NAMES = PersonID studyday posmood;
USEVARIABLES = posmood1-posmood7;
MISSING = ALL (-9999);
ANALYSIS:
ESTIMATOR = ML;
PROCESSORS = 4;
OUTPUT:
STDYX;
MODEL:
posmood1-posmood7 (totvar);
posmood1-posmood6 PWITH posmood2-posmood7 (totcov1-totcov6);
posmood1-posmood5 PWITH posmood3-posmood7 (totcov7-totcov11);
posmood1-posmood4 PWITH posmood4-posmood7 (totcov12-totcov15);
posmood1-posmood3 PWITH posmood5-posmood7 (totcov16-totcov18);
posmood1-posmood2 PWITH posmood6-posmood7 (totcov19-totcov20);
posmood1 PWITH posmood7 (totcov21);
[posmood1-posmood7] (mean);
MODEL CONSTRAINT:
NEW(TOEPcor1 TOEPcor2 TOEPcor3 TOEPcor4 TOEPcor5 TOEPcor6);
totcov1 = TOEPcor1*SQRT(totvar)*SQRT(totvar);
totcov2 = TOEPcor1*SQRT(totvar)*SQRT(totvar);
totcov3 = TOEPcor1*SQRT(totvar)*SQRT(totvar);
totcov4 = TOEPcor1*SQRT(totvar)*SQRT(totvar);
totcov5 = TOEPcor1*SQRT(totvar)*SQRT(totvar);
totcov6 = TOEPcor1*SQRT(totvar)*SQRT(totvar);
totcov7 = TOEPcor2*SQRT(totvar)*SQRT(totvar);
totcov8 = TOEPcor2*SQRT(totvar)*SQRT(totvar);
totcov9 = TOEPcor2*SQRT(totvar)*SQRT(totvar);
totcov10 = TOEPcor2*SQRT(totvar)*SQRT(totvar);
totcov11 = TOEPcor2*SQRT(totvar)*SQRT(totvar);
totcov12 = TOEPcor3*SQRT(totvar)*SQRT(totvar);
totcov13 = TOEPcor3*SQRT(totvar)*SQRT(totvar);
totcov14 = TOEPcor3*SQRT(totvar)*SQRT(totvar);
totcov15 = TOEPcor3*SQRT(totvar)*SQRT(totvar);
totcov16 = TOEPcor4*SQRT(totvar)*SQRT(totvar);
totcov17 = TOEPcor4*SQRT(totvar)*SQRT(totvar);
totcov18 = TOEPcor4*SQRT(totvar)*SQRT(totvar);
totcov19 = TOEPcor5*SQRT(totvar)*SQRT(totvar);
totcov20 = TOEPcor5*SQRT(totvar)*SQRT(totvar);
totcov21 = TOEPcor6*SQRT(totvar)*SQRT(totvar);