Skip to content
Prev 11398 / 20628 Next

bug/problem with update for merMod

Alexandra Kuznetsova <alku at ...> writes:
updateModel <- function(model, reml, l)
{
 
   nfit <- update(object=model, formula.=as.formula(paste(".~."))
                  , REML=reml ,contrasts=l, evaluate=FALSE)
   env <- environment(formula(model))
   nfit <- eval(nfit, envir = env)
   #nfit <- eval.parent(nfit)
   #nfit <- eval(nfit, parent.frame())
 }
[snip]
[snip]
It's not at all surprising that update fails when you do fancy
things with environments: it's a big headache trying to keep everything in
sync.  If you get a chance could you post this at 
https://github.com/lme4/lme4/issues ?

  Ben Bolker