Skip to content
Prev 1996 / 20628 Next

lmer/lmer2 & zero weights

On Thu, Feb 26, 2009 at 12:34 PM, <Richard.Silverwood at lshtm.ac.uk> wrote:
To tell you the truth I'm not sure whether weights of zero in lmer
would cause problems.  It is fairly easy to find the piece of code
that checks for negative or zero weights and change it to just check
for negative weights then see what the effect is.  As the message
says, the check is in the (hidden) function named lmerFrames near the
end

    ## check weights and offset
    if (any(wts <= 0))
        stop(gettextf("negative weights or weights of zero are not allowed"))
    if(length(off) && length(off) != NROW(Y))
        stop(gettextf("number of offsets is %d should equal %d (number
of observations)",
                      length(off), NROW(Y)))