Re: [R] How to include multiple random effects in 'lme' function

2011-06-15 Thread karena
Can anyone help me with this?

thank you in advance.

Karena

--
View this message in context: 
http://r.789695.n4.nabble.com/How-to-include-multiple-random-effects-in-lme-function-tp3598339p3600164.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] How to include multiple random effects in 'lme' function

2011-06-14 Thread karena
How to include multiple random effects in a 'lme' function?

For example, I want to set up 'days' and 'subject' as my random effects,

library(nlme)
fm - lme(trait~time+money, random=~days|subject, data=example)

However, if I have the following SAS code:
--
proc mixed data=example; class time money;
model trait=time money time*money/noint s;
random days/sub=subject;
random  int/sub=pedigreeID;
title 'random slope model with family effects';
run;

In this SAS code, it has multiple random effects, how can I convert this SAS
code to R code?

library(nlme)
fm - lme(trait~time+money, random=list(???), data=example)

How should I fill up the list()?

thank you very much,

Karena



--
View this message in context: 
http://r.789695.n4.nabble.com/How-to-include-multiple-random-effects-in-lme-function-tp3598339p3598339.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.