TITLE:
Eq 9.5: Truly Multivariate Longitudinal Model using MLM Syntax
Across-Variable Relationships via Directed Paths
DATA:
FILE = MPLUS_Chapter9.csv;
FORMAT = FREE;
DEFINE:
agesq = agec18*agec18;
VARIABLE:
NAMES = PersonID att12 PMmon copymon18 occasion age risky monitor agec18 att4
mon3 PMmon3 WPmon A18mon3 Ch18mon;
USEVARIABLES = risky mon3 att4 agec18 agesq;
MISSING = ALL (-9999);
CLUSTER = PersonID;
WITHIN = agec18 agesq;
BETWEEN = att4;
ANALYSIS:
ESTIMATOR = ML;
PROCESSORS = 4;
TYPE = TWOLEVEL RANDOM;
MODEL:
%WITHIN%
risky mon3 (Rresvar Mresvar);
WPres | risky ON mon3;
Rlin | risky ON agec18;
Mlin | mon3 ON agec18;
Rquad | risky ON agesq;
%BETWEEN%
[risky mon3 Rlin Mlin Rquad WPres] (bRint bMint bRlin bMlin bRquad bWPres);
risky mon3 Rlin Mlin Rquad@0 (Rintvar Mintvar Rlinvar Mlinvar Rquadvar);
WPres@0 (bWPrvar);
risky WITH Rlin (RintRlin);
mon3 WITH Mlin (MintMlin);
risky ON mon3 (bIntCont);
Rlin ON Mlin (bLinCont);
risky ON Mlin (bML2RIBP);
Rlin ON mon3 (bMI2RLBP);
risky 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);