[R] lmer: random factor nested in a fixed factor

Marie-Agnes Coutellec marie-agnes.coutellec at rennes.inra.fr
Mon Oct 6 15:58:35 CEST 2008


Hi all,

I try to build a model using lmer, with 2 crossed fixed factors (poptype 
and matingtype) and 2 random factors (pop and family) which I want to 
nest within poptype. Which of these formulae should I use ?
1. lmer(y~poptype*matingtype + (1|poptype/pop/fam))
2. lmer(y~poptype*matingtype + (poptype|/pop/fam))

thanks in advance
Agnes

-- 

Marie-Agnès Coutellec
UMR INRA-Agrocampus Ouest 985 ESE
Equipe Ecotoxicologie et Qualité des Milieux Aquatiques
65 rue de Saint-Brieuc - CS 84215
35042 Rennes cedex - FRANCE

tél.: +33(0)2 23 48 52 48
fax:  +33(0)2 23 48 54 40



More information about the R-help mailing list