TITLE:
Ch 6: 6c: Random Asymptote Random Amount Fixed Rate Model
Would not converge in Mplus
DATA:
FILE = MPLUS_Chapter6.csv;
FORMAT = FREE;
DATA LONGTOWIDE:
LONG = rt;
WIDE = rt1-rt6;
IDVARIABLE = PersonID;
REPETITION = session (1-6);
DEFINE:
rt = rt/10;
VARIABLE:
NAMES = PersonID session rt;
USEVARIABLES = rt1-rt6;
MISSING = ALL (-9999);
ANALYSIS:
ESTIMATOR = ML;
PROCESSORS = 4;
MODEL:
rt1-rt6 (totvar1-totvar6);
rt1 WITH rt2-rt6 (totcov1-totcov5) ;
rt2 WITH rt3-rt6 (totcov6-totcov9) ;
rt3 WITH rt4-rt6 (totcov10-totcov12);
rt4 WITH rt5-rt6 (totcov13-totcov14);
rt5 WITH rt6 (totcov15) ;
[rt1-rt6] (mean1-mean6);
MODEL CONSTRAINT:
NEW(fasymp famount frate resvar asympvar amountvar aacovar);
mean1 = fasymp + famount*EXP(frate*0);
mean2 = fasymp + famount*EXP(frate*1);
mean3 = fasymp + famount*EXP(frate*2);
mean4 = fasymp + famount*EXP(frate*3);
mean5 = fasymp + famount*EXP(frate*4);
mean6 = fasymp + famount*EXP(frate*5);
totvar1 = resvar + asympvar + aacovar*2*EXP(frate*0) + amountvar*EXP(frate*0)**2;
totvar2 = resvar + asympvar + aacovar*2*EXP(frate*1) + amountvar*EXP(frate*1)**2;
totvar3 = resvar + asympvar + aacovar*2*EXP(frate*2) + amountvar*EXP(frate*2)**2;
totvar4 = resvar + asympvar + aacovar*2*EXP(frate*3) + amountvar*EXP(frate*3)**2;
totvar5 = resvar + asympvar + aacovar*2*EXP(frate*4) + amountvar*EXP(frate*4)**2;
totvar6 = resvar + asympvar + aacovar*2*EXP(frate*5) + amountvar*EXP(frate*5)**2;
totcov1 = asympvar + aacovar*(EXP(frate*0)+EXP(frate*1)) + amountvar*(EXP(frate*0)*EXP(frate*1));
totcov2 = asympvar + aacovar*(EXP(frate*0)+EXP(frate*2)) + amountvar*(EXP(frate*0)*EXP(frate*2));
totcov3 = asympvar + aacovar*(EXP(frate*0)+EXP(frate*3)) + amountvar*(EXP(frate*0)*EXP(frate*3));
totcov4 = asympvar + aacovar*(EXP(frate*0)+EXP(frate*4)) + amountvar*(EXP(frate*0)*EXP(frate*4));
totcov5 = asympvar + aacovar*(EXP(frate*0)+EXP(frate*5)) + amountvar*(EXP(frate*0)*EXP(frate*5));
totcov6 = asympvar + aacovar*(EXP(frate*1)+EXP(frate*2)) + amountvar*(EXP(frate*1)*EXP(frate*2));
totcov7 = asympvar + aacovar*(EXP(frate*1)+EXP(frate*3)) + amountvar*(EXP(frate*1)*EXP(frate*3));
totcov8 = asympvar + aacovar*(EXP(frate*1)+EXP(frate*4)) + amountvar*(EXP(frate*1)*EXP(frate*4));
totcov9 = asympvar + aacovar*(EXP(frate*1)+EXP(frate*5)) + amountvar*(EXP(frate*1)*EXP(frate*5));
totcov10 = asympvar + aacovar*(EXP(frate*2)+EXP(frate*3)) + amountvar*(EXP(frate*2)*EXP(frate*3));
totcov11 = asympvar + aacovar*(EXP(frate*2)+EXP(frate*4)) + amountvar*(EXP(frate*2)*EXP(frate*4));
totcov12 = asympvar + aacovar*(EXP(frate*2)+EXP(frate*5)) + amountvar*(EXP(frate*2)*EXP(frate*5));
totcov13 = asympvar + aacovar*(EXP(frate*3)+EXP(frate*4)) + amountvar*(EXP(frate*3)*EXP(frate*4));
totcov14 = asympvar + aacovar*(EXP(frate*3)+EXP(frate*5)) + amountvar*(EXP(frate*3)*EXP(frate*5));
totcov15 = asympvar + aacovar*(EXP(frate*4)+EXP(frate*5)) + amountvar*(EXP(frate*4)*EXP(frate*5));