[R] help on nested mixed effects ANOVA

Mukta Chakraborty chakraborty.mukta at gmail.com
Mon Jan 12 18:24:42 CET 2009


Hello,
I am trying to run a mixed effects nested ANOVA but none of my codes
are giving me any meaningful results and I am not sure what I am doing
wrong. I am a new user on R and would appreciate some help.
The experimental design is that I have some frogs that have been
exposed to three acoustic Treatments and I am measuring neural
activity (egr), in 12 brain regions. Some frogs also called different
calls than others so I am testing for effect of Call as a fixed
effect.
I have Treatment (Trt), Brain Region (Region), and Call (Call) as
fixed effects and I am modeling Subject (Subj) as a random effect with
brain region nested within subject. I am using lme4 package and I am
not sure if that is the correct one to use.
I also have some missing values as NA as part of the dataset. I have
also set Subj, Region, and Call as factors using as.factor.
I have run the model which I am sure is wrong:
model1<-anova(lme(egr ~ Trt* Region, random=~1|Subj/Region,na.action=na.omit))

The output I am getting is:
   numDF           denDF        F-value           p-value
 Min.   : 1.00   Min.   : 32   Min.   :  2.891   Min.   :0.000e+00
 1st Qu.: 1.75   1st Qu.:197   1st Qu.: 12.120   1st Qu.:0.000e+00
 Median : 6.50   Median :252   Median : 20.275   Median :1.146e-05
 Mean   : 9.00   Mean   :197   Mean   : 87.353   Mean   :1.383e-05
 3rd Qu.:13.75   3rd Qu.:252   3rd Qu.: 95.508   3rd Qu.:2.530e-05
 Max.   :22.00   Max.   :252   Max.   :305.972   Max.   :3.240e-05

Any help on what I am doing wrong on the coding would be very helpful.
Thanks a lot.
Mukta
-- 
Department of Biology
Wilson Hall, Rm. 316
CB#3280,
University of North Carolina at Chapel Hill
Chapel Hill, NC 27599-3280.
Ph: (919) 962 1445




More information about the R-help mailing list