[R-sig-ME] Bleeding edge lme4 (or lme4a) plus DF estimation
Ben Bolker
bbolker at gmail.com
Fri Mar 2 05:18:48 CET 2012
Joehanes, Roby (NIH/NHLBI) [F] <roby.joehanes at ...> writes:
>
> Hi Ben,
>
> On Mar 1, 2012, at 2:05 PM, Ben Bolker wrote:
>
> > Joehanes, Roby (NIH/NHLBI) [F] <roby.joehanes at ...> writes:
> >
> >> I discovered a bug on your lme4Eigen's refit function.
> >> This is on version 0.9996875-9 (Description
> >> revision 169). I hope I got this right. If the original data
> >> matrix has some missing data in it, somehow the X
> >> and Z matrices (and y column) are correctly trimmed (i.e., the rows
> >> with missing data are removed).
> >> However, if I fit it with another y column, it reports error due
> >> to length mismatch. The error is as follows:
> >> Error: length(newresp <- as.numeric(as.vector(newresp))) == length(rr$y)
> >> is not TRUE
> >>
> >> Should I try the latest version and see if this bug has been fixed?
> >
> > It probably hasn't. It would be very helpful if you could send a small
> > self-contained example to lme4-authors <at> r-forge.wu-wien.ac.at --
> > we could probably make one up ourselves, but it would be quicker/
> > more motivational if you did it.
>
> Unfortunately, my data is considered classified.
> I am not authorized to give one out. I hope I can compose an
> example real soon.
It's not hard to make up an example:
library(lme4Eigen)
d <- data.frame(x=runif(100),f=factor(rep(1:10,10)))
set.seed(101)
u <- rnorm(10)
d <- transform(d,y=rnorm(100,1+2*x+u[f],0.2))
d[c(3,5,7),"x"] <- NA
fm1 <- lmer(y~x+(1|f),data=d)
refit(fm1,runif(100))
The obvious workaround for now is to use na.omit() on the
data in advance ...
More information about the R-sig-mixed-models
mailing list