Mplus手册没说清的multilevel模型语法规则
(2018-12-22 12:33:01)
标签:
研究 |
分类: 知无涯 |
因为用Mplus比较了一堆multilevel的模型,发现用户手册上有些地方没写清楚。本来这些细微的细节可以说清楚的,但它非要让人撞到error
message,随便的记一笔存档。
想起以前实验室有人来作录像编码,结果还没有开始工作,登陆电脑、正确打开编码软件、调出录像,都费了半天劲,就问我说why is
coding so hard?我当时忍住了吐槽,你还没有开始coding呢……现在我倒是有点理解对方的心情了。
规则如下(感谢读者来信,以下内容有调整,更新于1/7/2019):
首先,模型里纯的dependent variable
(不在模型里充当predictor),在variable命令这块写within XXX between XXX
的部分时不用把它们写在里面;
其次,因为GROUPMEAN centering can be
applied to WITHIN variables only,如果需要对某个变量进行groupmean
center那么就需要在variable命令中的within部分写清楚它的名字。当这个变量在within命令出现后就不能在between出现,如果想要一个该变量的group
average放between level那就需要自己先算好;
然后,如果模型中有ALGORITHM=INTEGRATION这样的语句的话,需要更好的定义within和between
最后,如果predictor本身是level
1变量,同时在模型里你只是想把它放在within层面(level1),你不center又不把它定义成within的话Mplus会用报错信息叫你定义(“
A latent between-level variable is created for an x-variable but
not referred to on the between level. Please
check that this is what is intended. If this is
not intended, specify the variable as a within
variable.”)Mplus的假设是你在within和between层面都有可能用到它,如果你没有其他更进一步的命令(比如在模型中把它只放在level
2,或者两层都放),那么Mplus会不确定你的模型是不是你最终想要的。为了避免这种情况出现,它就让你specify.
附上V8手册原话
The WITHIN option: identify the variables measured on the
individual level and modeled only on the within
level.
The BETWEEN option: identify the variables measured on the
cluster level and modeled only on the between
level.
Variables not mentioned on the WITHIN or the BETWEEN
statements are measured on the individual level and can be modeled
on both the within and between levels.
后一篇:在婚姻中成长