`Data:
file is BDI_TEPSant.dat;
variable:
names are id x1 x2 x3 y1 y2 y3 ;
missing is all (-99);
usevariables are x1 x2 x3 y1 y2 y3 ;
analysis:
type = general;
estimator is MLR;
model:
! Create between factors (random intercepts)
RX by x1@1 x2@1 x3@1;
RY by y1@1 y2@1 y3@1;
! Setthe residual variances of all X and Y variables to zero
x1-x3@0; y1-y3@0;
! Create the within part
WX1 BY x1@1;
WX2 BY x2@1;
WX3 BY x3@1;
WY1 BY y1@1;
WY2 BY y2@1;
WY3 BY y3@1;
!Specify the lagged effects
WX2 on WX1;
WX2 on WY1;
WX3 on WX2;
WX3 on WY2;
WY2 on WY1;
WY2 on WX1;
WY3 on WY2;
WY3 on WX2;
! Estimate the correlations within the same wave
WX1 WITH WY1;
WX2 WITH WY2;
WX3 WITH WY3;
!COVARIATE should add SES
!x1 x2 x3 x4 x5 y1 y2 y3 y4 y5 on gender;
!x1 x2 x3 x4 x5 y1 y2 y3 y4 y5 on SES;
![x1 x2 x3 ] (mx);
![y1 y2 y3 ] (my);
!overrule the Mplus default that all exogenous latent variables are correlated.
RX WITH WX1@0 WY1@0;
RY WITH WX1@0 WY1@0;
output:
TECH4 SAMPSTAT STDYX TECH1 CINTERVAL;`
这个是mplus代码