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) == obj...@dims["n"])
        obj...@y <- newresp
        obj...@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.

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to