Skip to content
Prev 78543 / 398502 Next

The mathematics inside lme()

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