RE: [R] nested random effects

From: Doran, Harold <HDoran_at_air.org>
Date: Thu 24 Mar 2005 - 05:33:24 EST


It should be random=~1|FAM/ID indicating individuals are nested within families.

-----Original Message-----
From: r-help-bounces@stat.math.ethz.ch
[mailto:r-help-bounces@stat.math.ethz.ch] On Behalf Of Federico Calboli Sent: Wednesday, March 23, 2005 12:34 PM To: Shaw, Philip (NIH/NIMH)
Cc: r-help
Subject: Re: [R] nested random effects

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.

Cheers,

F

-- 
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] imperial.ac.uk
f.calboli [.a.t] gmail.com

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide!
http://www.R-project.org/posting-guide.html

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Received on Thu Mar 24 05:40:09 2005

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