TITLE:
Eq 9.5: Truly Multivariate Longitudinal Model using SEM Syntax
Across-Variable Relationships via Directed Paths
DATA:
FILE = MPLUS_Chapter9.csv;
FORMAT = FREE;
DATA LONGTOWIDE:
LONG = agec18 | risky | mon3;
WIDE = age12-age18 | risky12-risky18 | mon12-mon18;
IDVARIABLE = PersonID;
REPETITION = occasion (12-18);
VARIABLE:
NAMES = PersonID att12 PMmon copymon18 occasion age risky monitor agec18 att4
mon3 PMmon3 WPmon A18mon3 Ch18mon;
USEVARIABLES = att4 age12-age18 risky12-risky18 mon12-mon18;
MISSING = ALL (-9999);
TSCORES = age12-age18;
ANALYSIS:
ESTIMATOR = ML;
PROCESSORS = 4;
TYPE = RANDOM;
MODEL:
Rint Rlin Rquad | risky12-risky18 AT age12-age18;
Mint Mlin | mon12-mon18 AT age12-age18;
[risky12-risky18@0 mon12-mon18@0];
risky12-risky18 (Rresvar);
mon12-mon18 (Mresvar);
risky12-risky18 PON mon12-mon18 (bWPres);
[Rint Mint Rlin Mlin Rquad] (bRint bMint bRlin bMlin bRquad);
Rint Mint Rlin Mlin Rquad@0 (Rintvar Mintvar Rlinvar Mlinvar Rquadvar);
Rint WITH Rlin (RintRlin);
Mint WITH Mlin (MintMlin);
Rint ON Mint (bIntCont);
Rlin ON Mlin (bLinCont);
Rint ON Mlin (bML2RIBP);
Rlin ON Mint (bMI2RLBP);
Rint Rlin ON att4 (battRint battRlin);
MODEL CONSTRAINT:
NEW(BPRIRLc BPMIMLc BPIntEff BPLinEff WPresStd BPIntStd BPLinStd BPI2Lstd BPL2Istd);
BPRIRLc = RintRlin / (SQRT(Rintvar)*SQRT(Rlinvar));
BPMIMLc = MintMlin / (SQRT(Mintvar)*SQRT(Mlinvar));
BPIntEff = bWPres + bIntCont;
BPLinEff = bWPres + bLinCont;
WPresStd = bWPres * SQRT(Mresvar) / SQRT(Rresvar);
BPIntStd = BPIntEff * SQRT(Mintvar) / SQRT(Rintvar);
BPLinStd = BPLinEff * SQRT(Mlinvar) / SQRT(Rlinvar);
BPL2Istd = bML2RIBP * SQRT(Mlinvar) / SQRT(Rintvar);
BPI2Lstd = bMI2RLBP * SQRT(Mintvar) / SQRT(Rlinvar);