I am running a multi-level model. I use the following commands with validatedRS6
as the outcome, random
as the predictor and clustno
a
(expanded from comment).
Congratulations, you found a bug in lme4
! This is fixed now:
https://github.com/lme4/lme4/commit/9c12f002821f9567d5454e2ce3b78076dabffb54
It is caused by having a variable called new
in the global environment (deep in the guts of the code, lme4
uses do.call(new,...)
and finds your variable new
rather than the built-in function new
).
You can install a patched version from Github using devtools::install_github()
(but you'll need compilation tools etc.). Alternately, there is a very simple workaround -- just call your variable anything other than new
(you can't just copy it, i.e. new2 <- new
-- you also have to make sure the old version is removed (rm("new")
)).