[R-sig-ME] random effect nested in the fixed effect
Hans Ekbrand
hans at sociologi.cjb.net
Sat Aug 18 15:32:21 CEST 2012
On Fri, Aug 17, 2012 at 09:39:48PM -0400, li li wrote:
> Dear all,
> I am starting to use R for mixed models.
> For example, for the date below,
> I want to fit the model values=sample+ind(sample).
> Here "sample" is a fixed effect and "ind"
> should be a random effect nested in "sample".
for lme4 I would have tried:
lmer(values ~ sample + (sample | ind), data = y)
--
Hans Ekbrand (http://sociologi.cjb.net) <hans at sociologi.cjb.net>
More information about the R-sig-mixed-models
mailing list