[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.
require(nlme)
data(Orthodont)
fm1<-lme(distance~age+ Sex,
data=Orthodont,random=~1|Subject, method="REML")
anova(fm1)
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:
require(lme4)
data(Orthodont)
fm2<-lme(distance~age+ Sex,
data=Orthodont,random=~1|Subject, method="REML")
anova(fm2)
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
analyzed.
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