[R] nested random effects
Berton Gunter
gunter.berton at gene.com
Wed Mar 23 20:04:58 CET 2005
I should have added that if you have only one Y observation per ID (within
family), then the ID variance component is residual error and the model
becomes (without any covariates)
Y~1, rand=~1|FAM
-- Bert
> 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 at 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
>
More information about the R-help
mailing list