An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-sig-mixed-models/attachments/20130605/d67c401b/attachment.pl>
fitting glmer after using doFit=FALSE
2 messages · Samuel Bussmann, Ben Bolker
Samuel Bussmann <bussmann.1 at ...> writes:
I have a question concerning the lme4 package -- specifically the glmer function. I am attempting to use doFit=FALSE to output and make edits to model matrices in order to accommodate a special form of the random effect. I can't seem to find out what function is used to fit the updated model matrices. I tried update and refit with no success. Any advice you could offer would be much appreciated.
Based on a look inside the lmer function, which has the following
snippet:
if (doFit) {
ans <- do.call(lmer_finalize, ans)
ans at call <- mc
}
It looks like this is what you want:
library("lme4.0") ## this is equivalent to CRAN-lme4
tmp <- lmer(Reaction ~ Days + (Days|Subject), sleepstudy, doFit=FALSE)
ans <- do.call(lme4.0:::lmer_finalize, tmp)
I would also encourage you to try the development version
of lme4, which you can install from github:
library("devtools")
install_github("lme4","lme4")
It offers finer control of the details of the construction
and fitting process (help("modular"))
Ben Bolker