[R] problem in R for Linear mixed model~
daniel at umd.edu
Mon Jun 23 04:22:46 CEST 2008
C is nested in B
##i.e. variety is nested in block
##End of example
cuncta stricte discussurus
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
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
case4:omitting the random intercept
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
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
More information about the R-help