各位大佬好!在学LMM的时候遇到了问题!如何得到fitted()里面的某个结果,具体代码如下:
lexdec2 = lexdec[lexdec$RT<7,] #删除超过1100毫秒的异常值 因为RT被对数转换,所以这里为7
lexdec3 = lexdec2[lexdec2$Correct == "correct",] #lexdec3为受测者做出正确答案时的数据
xylowess.fnc(RT~Trial | Subject,data = lexdec3,ylabel = "log RT" ) #做出拟合曲线
lexdec3.lmer = lmer(RT~Trial+(1|Subject)+(1|Word),data = lexdec3)# 这句是看主效应的意思吗?
ranef(lexdec3.lmer)$Word #提取Word #用ranef()从模型中提取对特定Word和Subject对截距的调整
fitted(lexdec3.lmer)[1:4] #提取拟合值
#拟合值结果为 1 2 3 4
# 6.272059 6.318508 6.245524 6.254167
#而实际值结果为
lexdec3$RT[1:4] #[1] 6.340359 6.308098 6.349139 6.186209
###接下来就是没看懂的地方###
# Let's reconstruct how the model gets to a fitted reaction time of
# 6.272 for subject A1 to item Owl
# We add the coefficient for the Intercept + the adjustments to it for
# the specified subject and item, and then add the effect of Trial
# this is very similar to what we have seen with regressions
6.394 + ranef(lexdec3.lmer)$Word["owl",] +
ranef(lexdec3.lmer)$Subject["A1",] -1.835e-04*23
请问为什么是这样相加,最不能理解的是 最后的-1.835e-04(Trial的估计值)为何要*23??
烦请各位大佬不吝赐教?