[R] degrees of freedom (lme4 and nlme)

Alexandre Galvão Patriota alexandrepatrot at yahoo.com.br
Fri Aug 27 16:57:46 CEST 2004

Hi, I'm having some problems regarding the packages
lme4 and nlme, more specifically in the denominator
degrees of freedom. I used data Orthodont for the two
packages. The commands used are below.


fm1<-lme(distance~age+ Sex,
data=Orthodont,random=~1|Subject, method="REML")


            numDF  DenDF  F-value    p-value
(Intercept)   1      80   4123.156   <.0001
age           1      80    114.838   <.0001
Sex           1      25     9.292    0.0054

The DenDF for each fixed effect is 80, 80 and 25.
Using the package lme4:


fm2<-lme(distance~age+ Sex,
data=Orthodont,random=~1|Subject, method="REML")


    numDF  Sum Sq  Mean Sq  DenDF  F-value    p-value
age  1	   235.356 235.356   105   114.838    <2.2e-16
Sex  1      19.044  19.044   105    9.292     0.002912

In this case the DenDF for each fixed effect is 105
and 105. In this example, the conclusions are still
the same, but it's not the case with another dataset I
I experience the same type of problem when using
glmmPQL of the MASS package and the GLMM of package
lme4. Could anyone give me a hint on why the two
functions are giving incompatible results?
thank you in advance for your help

Alexandre Galvão Patriota.

More information about the R-help mailing list