[R] some r code for linear mixed model

From: Manli Yan <manliyanrhelp_at_gmail.com>
Date: Mon, 16 Jun 2008 23:14:13 -0600

   Hello everyone:
  I have some quesions about the R code for linear mixed model,hope some one can give me some hints,thanks a lot~
  Say:
  we have A B C three factors
(i)A is fixed ,B and C are random,and B is nested in C,so the R code for
this case would be:

   case1<-lme(y~A+B+C+......,random=~B|C) where "B|C" actually mean B is nested in C, is it correct?
(ii)and if I update the case as:

  updatedcase1<-update(case1,random=~1|C), did I just remove the random effect of B, and only random effect of C left in the model? is it correct?

 (iii)A ,B,is fixed ,but C is random,no nested case,how am I gonna write the R code,since

      lme(y~A+B+C+.....,random=~C) lead to error,

(iv)for the case1,if I wirte this

   updatedcase2<-update(case1,random=B-1|C) where,"B-1|C",what this syntax stand for in R?

thank you guys very much~

        [[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 Tue 17 Jun 2008 - 05:25:41 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 Tue 17 Jun 2008 - 05:30:43 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