[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:06:50 CEST 2019


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



More information about the R-sig-mixed-models mailing list