I am following a tutorial and came across the following syntax:
# 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)
I am a bit confused by the (|)
syntax. I looked at the documentation for the linear mixed model syntax lmer
, and found:
"Random-effects terms are distinguished by vertical bars (|)
separating expressions for design matrices from grouping factors".
So I assume 1
and S
here are two random effects terms. S
makes sense as a random effect since it is a random variable that could stand for participant. But how is 1
a random variable? What does the 1
and |
mean here?