Hi,

For some reason do.call on anova fails if the models are named lmer objects.
Consider the following example:

library(lme4)
models <- list(
    lmer(Reaction ~ Days + (1| Subject), sleepstudy),
    lmer(Reaction ~ Days + (Days | Subject), sleepstudy))
#
# models is an unnamed list, do.call works (although with warning):
do.call(anova, models)
#
# after labeling the models, do.call gives an error:
names(models) <- c("randomIC", "randomSlope")
do.call(anova, models)
#
# without do.call, anova works fine:
anova(models[[1]], models[[2]])


Is there a possibility to use do.call(anova, models) on named lmer-models?


Regards,
  Denes

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to