TITLE:
  Ch 6: 6a: Fixed Asymptote Fixed Amount Fixed Rate Model

DATA:
  FILE = MPLUS_Chapter6.csv;
  FORMAT = FREE;

DATA LONGTOWIDE:
  LONG = rt;
  WIDE = rt1-rt6;
  IDVARIABLE = PersonID;
  REPETITION = session (1-6);

DEFINE:
  ! Rescale original rt so Mplus will show all results
  rt = rt/10;

VARIABLE:
  NAMES = PersonID session rt;
  USEVARIABLES = rt1-rt6;
  MISSING = ALL (-9999);

ANALYSIS:
  ESTIMATOR = ML;
  PROCESSORS = 4;

MODEL:
  rt1-rt6 (totvar);
  [rt1-rt6] (mean1-mean6);

MODEL CONSTRAINT:
  NEW(fasymp famount frate);
! Session=1 Time=0 Predicted Mean
  mean1 = fasymp + famount*EXP(frate*0);
! Session=2 Time=1 Predicted Mean
  mean2 = fasymp + famount*EXP(frate*1);
! Session=3 Time=2 Predicted Mean
  mean3 = fasymp + famount*EXP(frate*2);
! Session=4 Time=3 Predicted Mean
  mean4 = fasymp + famount*EXP(frate*3);
! Session=5 Time=4 Predicted Mean
  mean5 = fasymp + famount*EXP(frate*4);
! Session=6 Time=5 Predicted Mean
  mean6 = fasymp + famount*EXP(frate*5);