Re: [R] problem in R for Linear mixed model~

From: Manli Yan <manliyanrhelp_at_gmail.com>
Date: Sun, 22 Jun 2008 20:59:52 -0600

  Hi:
  Thank you very much,and for your case
  if I wirte as
 regress=lme(yield~nitro*Variety,data=Oats,random=~Variety|Block)

what this mean?
 Regards

2008/6/22 Daniel Malter <daniel_at_umd.edu>:

> Hi,
>
> random=~1|B/C
> C is nested in B
>
> ##Example
> data=Oats
> regress=lme(yield~nitro*Variety,data=Oats,random=~1|Block/Variety)
> ##i.e. variety is nested in block
> summary(regress)
> ##End of example
>
> Best,
> Daniel
>
>
> -------------------------
> cuncta stricte discussurus
> -------------------------
>
> -----Ursprüngliche Nachricht-----
> Von: r-help-bounces_at_r-project.org [mailto:r-help-bounces_at_r-project.org] Im
> Auftrag von Manli Yan
> Gesendet: Sunday, June 22, 2008 9:30 PM
> An: r-help_at_r-project.org
> Betreff: [R] problem in R for Linear mixed model~
>
> Dear R users:
> I just got confused some R code used in linear mixed model~
> example,two factors,A, B,C,A is fixed ,B,C are random,and B is nested in
> C,if I wannt to use linear mixed model,are the following code correct for
> each case?
> case1:want to know random effect of B,
> case1<-lme(y~A*B*C,random=~B|C) where "B|C" stand for what?,mean B is
> nested in C?
>
> case2: how to wirte random effect of C?
> case2<-lme(y~A*B*C,random=~C)? this doesnt work out,it seem it must have
> somehing like #|$
>
> case3.omitting the random effect for B from case1
> case3<-update(case1,random=~1|C),so I just type 1,so the random effect of
> B will be removed from the model,there only left random effect of c ,the
> random effect I removed ,which include both random intercept and slope
> ,correct??
>
> case4:omitting the random intercept
> case4<-update(case1,random=B-1|C)
> this code I got from some paper,it said by inputing B-1|C,then the random
> intercept is removed,so,if I want to remove random slode,I input B-2|C,it
> doesnt work out.
>
> case5 :how to know the both random effect of B,and C,I dont know how to
> wirtie this in R .
> And I am a little confused of these R code,especially the #|# part,what
> deos this syntax really mean in LME package,
>
> Thank you for your time~
>
> [[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<http://www.r-project.org/posting-guide.html>
> and provide commented, minimal, self-contained, reproducible code.
>
>

        [[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 Mon 23 Jun 2008 - 03:06:51 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 Mon 23 Jun 2008 - 03:30:51 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