`refit` argument in anova()
bwiernik opened this issue · 6 comments
Would it be possible to add a refit
argument to anova()
ala lme4/glmmTMB to automatically refit REML models with ML so that models with different fixed effects can be meaningfully compared?
Let me consider that. I think lme4/glmmTMB do such a refit by default, right? If so, then I would not want to do that (so refit=FALSE
would be the default), but giving the option by setting refit=TRUE
is something I could consider.
Also, I just noticed that at least lme4 also refits REML models even if they are identical in their fixed effects. That seems like a strange choice since there is no objection to LRTs based on REML model fits in this case (leaving aside the issue of what the appropriate null distribution is, but that issue affects ML/REML equally).
Added in 457f965 (default is refit=FALSE
and it only applies when doing a LRT of two models fitted with REML that differ in their fixed effects).
The default in glmmTMB is FALSE so that’s reasonable and makes sense to me! Awesome!
Good to know that there is some precedent for refit=FALSE
as well.
Thanks for bringing up this issue -- definitely a nice addition.
Thank you!