全部版块 我的主页
论坛 计量经济学与统计论坛 五区 计量经济学与统计软件 HLM专版
7917 4
2017-05-26
求教各路大神,用Mplus做2-1-1模型的HLM检验,应该如何编写程序。或者有什么实用的书可以推荐。第一次使用MPlus
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

全部回复
2017-6-2 18:06:52
E. 2-1-1 model (MSEM)
TITLE: 2-1-1 mediation (MSEM)
DATA: FILE IS mydata.dat; ! text file containing raw data in long format
VARIABLE: NAMES ARE
group x m y;
USEVARIABLES ARE
group x m y;
BETWEEN IS x; ! identify variables with only Between variance;
! variables that are not claimed as "BETWEEN IS" or "WITHIN IS" can have
   ! both Within and Between variance
CLUSTER IS group; ! Level-2 grouping identifier
ANALYSIS: TYPE IS TWOLEVEL RANDOM;
MODEL: ! model specification follows
%WITHIN% ! Model for Within effects follows
m y; ! estimate Level-1 (residual) variances for m and y
y ON m; ! regress y on m
%BETWEEN% ! Model for Between effects follows
x m y; ! estimate Level-2 (residual) variances for x, m, and y
m ON x(a); ! regress m on x, call the slope "a"
y ON m(b); ! regress y on m, call the slope "b"
y ON x; ! regress y on x
MODEL CONSTRAINT: ! section for computing indirect effect
NEW(indb); ! name the indirect effect
indb=a*b; ! compute the Between indirect effect
OUTPUT: TECH1 TECH8 CINTERVAL; ! request parameter specifications, starting values,
! optimization history, and confidence intervals for all effects  
F. 2-1-1 model with random slopes (MSEM)
TITLE: 2-1-1 mediation (MSEM)
DATA: FILE IS mydata.dat; ! text file containing raw data in long format
VARIABLE: NAMES ARE
group x m y;
USEVARIABLES ARE
group x m y;
BETWEEN IS x; ! identify variables with only Between variance;
! variables that are not claimed as "BETWEEN IS" or "WITHIN IS" can have
! both Within and Between variance
CLUSTER IS group; ! Level-2 grouping identifier
ANALYSIS: TYPE IS TWOLEVEL RANDOM;
MODEL: ! model specification follows
%WITHIN% ! Model for Within effects follows
m y; ! estimate Level-1 (residual) variances for m and y
sb | y ON m; ! regress y on m
%BETWEEN% ! Model for Between effects follows
x m y; ! estimate Level-2 (residual) variances for x, m, and y
m ON x(a); ! regress m on x, call the slope "a"
y ON m(bb); ! regress y on m, call the slope "bb"; bb = contextual effect, not the Between slope
y ON x; ! regress y on x
sb WITH x m y; ! estimate Level-2 covariances of sb with x, m, and y
[sb](bw); ! estimate the mean of sb, call it "bw"
MODEL CONSTRAINT: ! section for computing indirect effect
NEW(b indb); ! name the Between b path and the indirect effect
b=bb+bw; ! compute Between b path
indb=a*b; ! compute the Between indirect effect
OUTPUT: TECH1 TECH8 CINTERVAL; ! request parameter specifications, starting values,
! optimization history, and confidence intervals for all effects

二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2017-6-2 18:07:37
我也是小白,在网上找的
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2017-6-2 18:40:05
哪位大神,请教,跨层次模型“2-1-1-2”的语法
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2024-3-25 22:50:08
lipengfeipinggu 发表于 2017-6-2 18:06
E. 2-1-1 model (MSEM)
TITLE: 2-1-1 mediation (MSEM)
DATA: FILE IS mydata.dat; ! text file containi ...
你好,请问多层中的调节效应,我可以直接用交互项做吗?不用那个随机回归
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

相关推荐
栏目导航
热门文章
推荐文章

说点什么

分享

扫码加好友,拉您进群
各岗位、行业、专业交流群