Skip to content
Prev 10817 / 20628 Next

Why does anova.merMod use refit?

Henrik Singmann <henrik.singmann at ...> writes:
I think there are some reasonable design considerations here,
not obvious what the best answer(s) is/are.

1. one way or the other we should prevent users from running
anova() on REML-fitted models *with different fixed effects* (arguably
there is a sensible use case for using anova() on models that
differ only in their random effects
  1a. should we try to do this automatically or should we throw
an error and hint to them how best to achieve their goal?

2 refit should allow appropriate optimization control parameters to be set
  2a a model refit should always inherit the optimization control parameters
from its parent model

3 we should try not to make too many backward-incompatible changes
(i.e. even if the current behaviour is weird we should make changes
carefully/gradually so as not to disturb users who have adapted to it)

  Point #2 is especially relevant; the design goal is to have #2a
be true, but it might not be.  Examples of where it is false, especially
minimalistic ones that can be run and tested as part of unit tests,
are especially welcome.

  Ben Bolker