[R-sig-ME] allFit fails after removing object with starting values for model parameters from workspace
Gerrit Eichner
gerr|t@e|chner @end|ng |rom m@th@un|-g|e@@en@de
Thu Aug 8 15:10:44 CEST 2019
I forgot to mention that I use lme4_1.1-21.9001
and
R version 3.6.1 (2019-07-05)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 18362)
-- Gerrit
---------------------------------------------------------------------
Dr. Gerrit Eichner Mathematical Institute, Room 212
gerrit.eichner using math.uni-giessen.de Justus-Liebig-University Giessen
Tel: +49-(0)641-99-32104 Arndtstr. 2, 35392 Giessen, Germany
http://www.uni-giessen.de/eichner
---------------------------------------------------------------------
Am 08.08.2019 um 15:06 schrieb Gerrit Eichner:
> Dear lmer-experts,
>
> if I refit a fitted model with all available optimizers AFTER
> removing the object which contains the starting values for the
> parameters of the model as in
>
> theta <- c(1, 0.01, 0.2)
> fm <- lmer(Reaction ~ Days + (Days | Subject), data = sleepstudy,
> start = theta)
> rm(theta)
> allFit(fm, verbose = FALSE)
>
> none of the optimizers succeeds:
>
> original model:
> Reaction ~ Days + (Days | Subject)
> optimizers (7): bobyqa, Nelder_Mead, nlminbwrap, nmkbw, optimx.L-BFGS-B,
> nloptwrap.NLOPT_LN_N...
> 7 optimizer(s) failed
> differences in negative log-likelihoods:
> max= -Inf ; std dev= NA
> Warning messages:
> 1: In min(nllvec) : no non-missing arguments to min; returning Inf
> 2: In max(nllvec - min(nllvec)) :
> no non-missing arguments to max; returning -Inf
>
>
> If I don't remove theta from my workspace everything works fine.
> Is there a workaround for this - from my perspective - unwanted
> behaviour? (I have situations where allFit is used in a different
> environment from the one wherein the model was fit, e.g., after
> fitting the model the object which contains the fit is saved and
> later loaded in another R-session to be processed by allFit.)
> I could, of course, save theta everytime as well ... Any ideas?
>
> Best regards -- Gerrit
>
> ---------------------------------------------------------------------
> Dr. Gerrit Eichner Mathematical Institute, Room 212
> gerrit.eichner using math.uni-giessen.de Justus-Liebig-University Giessen
> Tel: +49-(0)641-99-32104 Arndtstr. 2, 35392 Giessen, Germany
> http://www.uni-giessen.de/eichner
>
> _______________________________________________
> R-sig-mixed-models using r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
More information about the R-sig-mixed-models
mailing list