TITLE: Multilevel Mediation Analysis, 1-1-1 Model, with Random slopes, MSEM;
DATA: FILE IS E:\ABC\data1.dat;
VARIABLE:
NAMES ARE
id time SQ SD MAIA MAIA2 MAAS PA NA P N Pre Case;
USEVARIABLES ARE
id SQ MAIA PA P N Pre;
WITHIN = P N Pre;
CLUSTER IS id;
ANALYSIS: TYPE IS TWOLEVEL RANDOM;
MODEL:
%WITHIN%
sa | MAIA ON SQ;
sb | PA ON MAIA;
sc | PA ON SQ;
PA ON P;
PA ON N;
PA ON Pre;
%BETWEEN%
sa sb sc SQ MAIA PA;
sa WITH sc SQ MAIA PA;
sa WITH sb(cab);
sb WITH sc SQ MAIA PA;
sc WITH SQ MAIA PA;
MAIA ON SQ(ab);
PA ON MAIA(bb);
PA ON SQ;
[sa](aw);
[sb](bw);
MODEL CONSTRAINT:
NEW(a b indb indw);
a=aw+ab;
b=bw+bb;
indw=aw*bw+cab;
indb=a*b;
OUTPUT: CINTERVAL;
代碼就是這樣的
|