Skip to content

random effect nested in the fixed effect

3 messages · Li Li, Hans Ekbrand

#
On Fri, Aug 17, 2012 at 09:39:48PM -0400, li li wrote:
for lme4 I would have tried:

lmer(values ~ sample + (sample | ind), data = y)
#
On Fri, Aug 17, 2012 at 09:39:48PM -0400, li li wrote:
[...]
This looks like crossed data. It this really is nested data, then it
is implicitly nested as described in
http://lme4.r-forge.r-project.org/book/Ch2.pdf, page 39, and my
formula will not work. For my formula to work, you have to make
samples clearly unique (see page 40 in
http://lme4.r-forge.r-project.org/book/Ch2.pdf):