Douglas Bates wrote:
Christoph Buser wrote:

Hi all

I tried to reproduce an example with lme and used the Orthodont
dataset.

library(nlme)
fm2a.1 <- lme(distance ~ age + Sex, data = Orthodont, random = ~ 1 | Subject)
anova(fm2a.1)
...

Regards,
Christoph Buser


No. The calculation of denominator degrees of freedom in lme4 is bogus and I believe this is documented. Note that for all practical purposes there is very little difference between 25 and 100 denominator degrees of freedom.


lme4 is under development (and has been for a seemingly interminable period of time). Getting the denominator degrees of freedom calculation "right" is way down the list of priorities.

Many people express dismay about the calculation of denominator degrees of freedom in all versions of lme4. IIRC Frank Harrell characterizes this as one of the foremost deficiencies in R relative to SAS. I don't agree that this is a glaring deficiency. In fact I believe that there is no "correct" answer. The F statistics in a mixed model do not have an F distribution under the null hypothesis. It's all an approximation, which is why I don't stay up nights worrying about the exact details of the approximation.

Doug - the main concern is accurate P-values; I don't really care which approximations are best, just that the ones used are at least as good as those in SAS. Without being an expert, I have come to believe that at the moment SAS is better than R in 2 areas: accurate P-values from mixed models and handling massive databases. On the former point I could easily be swayed by some type I error simulations.



My plan for lme4 is that one slot in the summary object for an lme model will be an incidence table of terms in the fixed effects versus grouping factors for the random effects. This table will indicate whether a given term varies within groups defined by the grouping factor. Anyone who wants to implement their personal favorite calculation of denominator degrees of freedom based on this table will be welcome to do so.

I will be interested also to see timings of lme4 (using S4) vs nlme (using S3) for the same model.


Cheers,

Frank


I personally think that tests on the fixed-effects terms will be better implemented using the restricted likelihood-ratio tests defined by Reinsel and Ahn rather than the Wald tests and the whole issue of denominator degrees of freedom may be moot.


My apologies if I seem to be peeved. I am not upset by your question - it is an entirely reasonable question. It is just that I have discussed the issue of denominator degrees of freedom too many times.

To me a more important objective of lme4 is to be able to handle random effects associated with crossed or partially crossed grouping factors. I believe that in those cases the calculation of denominator degrees of freedom will be very complicated and even more of an approximation than in the case of nested grouping factors. This is why I would rather finesse the whole issue by using the Reinsel and Ahn approach.


______________________________________________ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Reply via email to