Skip to content
Back to formatted view

Raw Message

Message-ID: <loom.20130218T171556-630@post.gmane.org>
Date: 2013-02-18T16:23:53Z
From: Ben Bolker
Subject: nested random factor using lme produces errors

melswed <amelie.truchy <at> slu.se> writes:

> 
> I understand. I want to specify that drug is only a fixed factor and family
> should be the only random factor. So maybe, my R code is wrong.... If I
> specify random=~1|drug/family it is only because I wanted to specify that
> family is nested within drug.


 Then you want 

random=~1|drug:family

drug/family expands to drug + drug:family, so it includes both an effect of
drug and a family-within-drug term.

See http://glmm.wikidot.com/faq#modelspec , which I've just updated.