when I fit a model using the lme4 version of lmer, save it and try to convert it to a lmerModlmerTest object after clearing the environment, I get the following error message:
Error in as_lmerModLmerTest(model_lme4_reloaded) :
Unable to extract deviance function from model fit
I think the reason is that as_lmerModLmerTest tries to retrieve information from the environment no longer available. My workaround is to refit the model directly with lmerTest being loaded, which is however time consuming.
If there is no simple solution, it would probably be good to have at least a more meaningful error message.
Hello,
when I fit a model using the lme4 version of lmer, save it and try to convert it to a lmerModlmerTest object after clearing the environment, I get the following error message:
Here is a minimal reproducible example:
I think the reason is that as_lmerModLmerTest tries to retrieve information from the environment no longer available. My workaround is to refit the model directly with lmerTest being loaded, which is however time consuming. If there is no simple solution, it would probably be good to have at least a more meaningful error message.
Thanks a lot in advance :) Cheers, Lea