The mathematics inside lme()
Now I want to evaluate GroupCov as a covariate to Treat. I
can then start with either m1 or m2 as base, but what is most
correct when GroupCov has only one value for each Group?
m3 <- lm(Yield ~ Treat + GroupCov + Treat:GroupCov)
gives the same fixed effects as
m4 <- lme(Yield ~ Treat + GroupCov + Treat:GroupCov,
random =~1| Group)
but this time the prob.values for GroupCov is much stronger
in m3 than in m4. Needless to say, anova(m3,m4) tells that m4
is a better *model* than m3. But is it better for my purpose?
Well, I do not actually know what your purpose is ... ... but in my oppinion the second model is much better (and I am tempted to say the first one is wrong). The crucial point here is that there is only one value of GroupCov in each Group. Thus the number of replications that provide degrees of freedom for the effect of GroupCov is the number of groups. m4 adjusts for this fact, has a lower df for the GroupCov and thus a lower p-value. In m3, you model as if all your observations are independent for all variables. This is actually the case for none but may become more visible for GroupCov because this variable is constant for all units within group (and thus this value is certainly not independent). Cheers, Lorenz - Lorenz Gygax, Dr. sc. nat. Centre for proper housing of ruminants and pigs Swiss Federal Veterinary Office agroscope FAT T??nikon, CH-8356 Ettenhausen / Switzerland