[R] re fit with binomial model (lme4)
Ben Bolker
bolker at ufl.edu
Tue Apr 28 15:03:25 CEST 2009
I think the following works, but use with caution -- I just
wrote it last night.
setMethod("refit", signature(object = "mer", newresp = "matrix"),
function(object, newresp, ...)
{
## newresp <- as.double(newresp[!is.na(newresp)])
wts <- rowSums(newresp)
newresp <- newresp[,1]/wts
stopifnot(length(newresp) == object at dims["n"])
object at y <- newresp
object at pWt <- wts
lme4:::mer_finalize(object)
})
Ben Bolker
--
View this message in context: http://www.nabble.com/refit-with-binomial-model-%28lme4%29-tp23255224p23276751.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help
mailing list