[R-sig-ME] Formula Explanation in lme4 Vignette

Dario Strbenac dstr7320 at uni.sydney.edu.au
Fri Nov 14 01:00:17 CET 2014


Hello,

In the software article vignette, it says that

resp ~ FEexpr + (REexpr1|factor1)

is the general format of mixed models. However, there's a sleep study example which has

fm1 <- lmer(Reaction ~ Days + (Days | Subject), sleepstudy)

When I look at those two formulae, I see that Days matches both FEexpr and REexpr1. I thought that a factor could be a fixed effect or random effect, but not both. In lectures, I remember fixed and random effects as being exclusive, depending on if all the levels were measured, or just a subset of them.

--------------------------------------
Dario Strbenac
PhD Student
University of Sydney
Camperdown NSW 2050
Australia



More information about the R-sig-mixed-models mailing list