Re: [R] nested random effects

From: Federico Calboli <>
Date: Thu 24 Mar 2005 - 04:33:47 EST

On Wed, 2005-03-23 at 11:58 -0500, Shaw, Philip (NIH/NIMH) wrote:
> Hi
> I am struggling with nested random effects and hope someone can help.
> I have individuals (ID) who are nested within families (FAM). I want to
> model an outcome variable, and take account of the intercorrelation of
> individuals within each family.
> I think this amounts to two random effects, one nested within the other.
> How can I model this in R?
> So far I have tried using the library(nlme), and then
> Y~ID, random=~1|ID*FAM,

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).

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



Federico C. F. Calboli
Department of Epidemiology and Public Health
Imperial College, St Mary's Campus
Norfolk Place, London W2 1PG

Tel  +44 (0)20 7594 1602     Fax (+44) 020 7594 3193

f.calboli [.a.t]
f.calboli [.a.t]

______________________________________________ mailing list
PLEASE do read the posting guide!
Received on Thu Mar 24 04:48:36 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:30:55 EST