[R] nested random effects

Berton Gunter gunter.berton at gene.com
Wed Mar 23 19:04:06 CET 2005

> An interaction random effect/fixed effect is noted as 
> random ~1|random/fixed
> in your case random =~1|ID/FAM (but I don't uderstand why indiviuals
> withing families are fixed and and families are random, but there you
> go).

1. Fixed effects cannot be nested within random effects. 

2. The "random" specification is backwards: nesting, |g1/g2/g3... , is outer
to inner and so FAM/ID

> Check out Pinheiro and Bates Ch1, especially pg 23 onwards.

Indeed. See the Worker/Machine example on p. 24 for outer to inner nesting.

-- Bert Gunter

More information about the R-help mailing list