[R] Two factor ANOVA in lme

nat n.r.street at soton.ac.uk
Sun Nov 21 12:38:52 CET 2004


I want to specify a two-factor model in lme, which should be easy? 
Here's what I have:

factor 1 - treatment FIXED (two levels)
factor 2 - genotype RANDOM (160 genotypes in total)

I need a model that tells me whether the treatment, genotype and 
interaction terms are significant. I have been reading 'Mixed effects 
models in S' but in all examples the random factor is not in the main 
model - it is a nesting factor etc to specify the error structure. Here 
i need the random factor in the model.

I have tried this:

height.aov<-lme(height~trt*genotype,data.reps,random=~1|genotype,na.action=na.exclude)

but the output is nothing like that from Minitab (my only previous 
experience of stats software). The results for the interaction term are 
the same but F values for the factors alone are very different between 
Minitab and R.

This is a very simple model but I can't figure out how to specify it. 
Help would be much appreciated.

As background: The data are from a QTL mapping population, which is why 
I must test to see if genotype is significant and also why genotype is a 
random factor.

Thanks




More information about the R-help mailing list