Skip to content

Bleeding edge lme4 (or lme4a) plus DF estimation

4 messages · Joehanes, Roby (NIH/NHLBI) [F], Ben Bolker

#
Dr Bates,

Thank you for your reply.

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?

Also, will update method speed up computation if I changed the X (or Z) matrix a little bit by swapping or adding up to three columns (from about 40+ columns)?

Thank you,
Roby
On Feb 27, 2012, at 6:03 PM, Douglas Bates wrote:

            
#
Joehanes, Roby (NIH/NHLBI) [F] <roby.joehanes at ...> writes:
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.
Probably not -- refit saves time by (1) starting from previous
starting values and (2) not having to rebuild X and Z components.
You could do #1 yourself by doing something like setting

update(...,start=getME(prevfit,"theta"),...)

(I think).
#
Hi Ben,
On Mar 1, 2012, at 2:05 PM, Ben Bolker wrote:

            
Unfortunately, my data is considered classified. I am not authorized to give one out. I hope I can compose an example real soon.
Thank you. I will try it out.

Sincerely,
Roby
#
Joehanes, Roby (NIH/NHLBI) [F] <roby.joehanes at ...> writes:
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 ...