[R] Help with lme basics
Greenberg, Jeff (J.A.)
jgreenb2 at ford.com
Thu Apr 18 18:06:58 CEST 2002
In Baron and Li's "Notes on the use of R for psychology experiments and questionnaires" http://cran.r-project.org/doc/contrib/rpsych.htm they describe a balanced data set for a drug experiment:
"... a test of drug treatment effect by one between-subject factor: group (two groups of 8 subjects each) and two within-subject factors: drug (2 levels) and dose (3 levels). "
This design is identical to an unbalanced one that I am interested in analyzing in R. I have both missing cells and unequal number of observations per cell. This is a repeated-measures design with test subject as a random factor.
Baron and Li show how to analyze this design using aov:
summary(aov(effect ~ gp * drug * dose + Error(subj/(dose+drug)), data=Ela.uni))
When I analyze my design I get additional terms in each error stratum because of the missing cells. The results appear sensible, but I've been told that lme is a better way to model this data.
My question is: how do I set up an equivalent model using lme? Using the balanced data set in Baron and Li I've tried this model:
ela.lme<-lme(effect~gp*dose*drug,random=~1|subj/drug/dose)
But this does not produce a sensible (to me!) anova table. I don't think I understand the method lme uses to specify nesting.
Thanks in advance.
--------------------------------------------------------------------
Jeff Greenberg Ford Research Laboratory Dearborn, MI
jgreenb2 at ford.com Phone: (313) 323-8273 Fax: (313) 248-4602
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
More information about the R-help
mailing list