Message-ID: <1415923216344.19605@uni.sydney.edu.au>
Date: 2014-11-14T00:00:17Z
From: Dario Strbenac
Subject: Formula Explanation in lme4 Vignette
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