Skip to content
Back to formatted view

Raw Message

Message-ID: <20120818133207.GA12121@samir>
Date: 2012-08-18T13:32:21Z
From: Hans Ekbrand
Subject: random effect nested in the fixed effect
In-Reply-To: <CAHLnndYW79boeEbhEJKvLWiO7NihY+UfYTKSt1jQZ66Wn4TA3w@mail.gmail.com>

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>