我试图从我的数据中计算贝叶斯因子,并且我的混合效果模型在R和SPSS中获得了非常不同的结果。它对于线性的很好,但不是二项式的。这是R代码:
``memory.model = glmer(correct ~ (1|ps) + (1|item), data=memorystudy, family=binomial, glmerControl(optimize = "bobyqa"))
memory.model2 = glmer (correct ~ encoding + retrieval + (1|ps) + (1|item), data=memorystudy, family=binomial, glmerControl(optimize = "bobyqa"))
memory.model3 = glmer (correct ~ encoding*retrieval + (1|ps) + (1|item), data=memorystudy, family=binomial, glmerControl(optimize = "bobyqa"))``
和SPSS语法:
``GENLINMIXED
/FIELDS TARGET = correct
/DATA_STRUCTURE SUBJECTS = ps*item COVARIANCE_TYPE = VARIANCE_COMPONENTS
/TARGET_OPTIONS DISTRIBUTION = BINOMIAL LINK = LOGIT REFERENCE = 0
/FIXED EFFECTS = encoding retrieval
/RANDOM USE_INTERCEPT = TRUE SUBJECTS = ps*item.``
``GENLINMIXED
/FIELDS TARGET = correct
/DATA_STRUCTURE SUBJECTS = ps*item COVARIANCE_TYPE = VARIANCE_COMPONENTS
/TARGET_OPTIONS DISTRIBUTION = BINOMIAL LINK = LOGIT REFERENCE = 0
/FIXED EFFECTS = encoding retrieval encoding*retrieval
/RANDOM USE_INTERCEPT = TRUE SUBJECTS = ps*item.``
R中的BIC对于每个型号约为2280,而在SPSS中它的13973 ......并且SPSS没有给我任何结果,例如效果大小,所以我无法比较它与R.有没有办法在SPSS中改变某些东西,这样可以得到一致的结果?
答案 0 :(得分:0)
我承认我不是SPSS用户,所以如果有SPSS用户,请随时更正此答案。我注意到在你的R模型中,ps
和item
是单独的随机截距。略读SPSS手册(参见例如this link,在“线性混合模型”部分下),它们应该单独指定,例如。
``GENLINMIXED
/FIELDS TARGET = correct
/DATA_STRUCTURE SUBJECTS = ps*item COVARIANCE_TYPE = VARIANCE_COMPONENTS
/TARGET_OPTIONS DISTRIBUTION = BINOMIAL LINK = LOGIT REFERENCE = 0
/FIXED EFFECTS = encoding retrieval
/RANDOM USE_INTERCEPT = TRUE SUBJECTS = ps
/RANDOM USE_INTERCEPT = TRUE SUBJECTS = item.``