Zoya Pyrkina <zoyapyrkina <at> gmail.com> writes:

> I need  help with translating these SAS codes into R with lme()? I have a
> longitudinal data with repeated measures (measurements are equally spaced
> in time, subjects are measured several times a year). I need to allow slope
> and intercept vary.
> 
> SAS codes are:
> 
> proc mixed data = survey method=reml;
> 
> class  subject var1 var3 var2 time;
> 
> model score = var2 score_base var4 var5 var3 var6 var7 var1 time/ noint
> solution;
> 
> random intercept timecontinious / subject=subject type=un g gcorr v vcorr;
> 
> run;
> 

  You might have more luck submitting this to r-sig-mixed-models <at>
r-project.org.  Have you looked at the lme documentation and examples
(and Pinheiro and Bates's 2000 book)?  You probably want something
*approximately* like

lme(score~var2+score_base+var4+var5+var3+var6+var7+var1+time-1,
   random=~time|subject,
   data=...)

A reproducible example would be nice too.

   Ben Bolker

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

Reply via email to