Thanks for sending that, Ben. I have incorporated a slightly modified version, with attribution, in the lme4 sources.
On Tue, Apr 28, 2009 at 8:03 AM, Ben Bolker <bol...@ufl.edu> wrote: > 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) > }) ______________________________________________ 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.