[R] Repeated measures using lme

From: Tom Cohen <tom.cohen78_at_yahoo.se>
Date: Thu, 06 Mar 2008 10:51:46 +0100 (CET)


Dear list,    

  I am trying to do a repeated analysis using lme in R and a little bit unsure if I have set up the right statement. The problem is the IL6 (interleukin 6) was measured 5 times on each individual in each of 6 companies. The hypotheses are to see whether there is a relationship between IL6 and the total dust in each of the companies and if there is any change in IL6 across time points. So the fixed effects are total dust, company and random effects is individual. The model would be like this    

  lme(IL6~ dust + time*company, random=~time|individual,

                        correlation=corAR1(form=~time|individual), data=dat)
   

   with time as a repeated measure.    

   the analysis in SAS would be    

  proc mixed data=dat;
  class time individual company;
  model IL6=dust company time company*time;   repeated time/Sub=individual(company) type=AR(1) r rcorr;   random individual;

  lsmeans company time company*time/slice=time;   run;    

  Am I writing the right code in R that would give me the same results if doing the analysis in SAS. Also is there any command in R that does the same thing as SLICE in SAS does, to test when in time there is difference between companies?    

  Thanks for any help,
  Tom        



Sök efter kärleken!

        [[alternative HTML version deleted]]



R-help_at_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. Received on Thu 06 Mar 2008 - 10:06:13 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Fri 07 Mar 2008 - 14:30:20 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive