我正在跟随一个教程,遇到了以下语法:
# assume 'S' is the name of the subjects column
# assume 'X1' is the name of the first factor column
# assume 'X2' is the name of the second factor column
# assume 'X3' is the name of the third factor column
# assume 'Y' is the name of the response column
# run the ART procedure on 'df'
# linear mixed model syntax; see lme4::lmer
m = art(Y ~ X1 * X2 * X3 + (1|S), data=df)
anova(m)
我对 (|)
语法有点困惑。 我查看了线性混合模型语法 lmer
的文档,并发现:“通过竖杠 (|)
区分随机效应项,将设计矩阵表达式与分组因素分开”。
所以我假设这里的 1
和 S
是两个随机效应项。 S
作为一个随机效应是有意义的,因为它是一个可以代表参与者的随机变量。但是 1
怎么会成为一个随机变量呢?这里的 1
和 |
有什么含义?
1
个显式截距:https://dev59.com/y2Yr5IYBdhLWcg3w1NZY - zx8754