Skip to content

lme - nested - One fixed effect and another within that as random effect

3 messages · Divaker, Doran, Harold, Douglas Bates

#
What do you mean by not working? Your lme and lmer code seem to be
equivalent.
#
On Nov 27, 2007 8:43 AM, Doran, Harold <HDoran at air.org> wrote:
Not really.  Supplier:Batch is the batch grouping factor without the
implicit nesting.  That is, it has a different level for each
different batch (which seems to me to be the only sensible way to
define such a factor but, in the old days, people seemed to think it
was important to specify nesting implicitly).  The expression
Supplier/Batch implies two random effects, one for Supplier and one
for Supplier:Batch.

The simple way out is to define

process$realBatch <- with(process, Supplier:Batch)

and fit the lme model with random = ~ 1|realBatch