Re: [R] Bug in lmer?

From: Martin Maechler <>
Date: Fri 30 Sep 2005 - 17:21:37 EST

>>>>> "Mark" == Mark Lyman <>
>>>>> on Thu, 29 Sep 2005 14:44:38 -0600 writes:

    Mark> I am relatively new to R so I am not confident enough in what I am doing     Mark> to be certain this is a bug.

    Mark> I am running R 2.1.1 on a Windows XP     Mark> machine and the lme4 package version 0.98-1.

lme4 nowadays is heavily based on "Matrix" which version are you using there?

    Mark> The following code fits the model I want using the     Mark> nlme package version 3.1-60.

      < .............. > {see a script at the end}

    Mark> The problem is that when I try fitting the model using     Mark> the lmer function with the following code:

    Mark> lmer(adg~trt+(1|loc)+(1|block:loc)+(1|loc:trt),mltloc)

    Mark> I get this message from Windows and R closes.

    Mark> >> R for Windows GUI front-end has encountered a problem and needs to     Mark> >> close. We are sorry for the inconvenience.

That definitely means there is a bug.
The question is *where* the bug is: "lme4", "Matrix", "R", "Windows".

One first thing coming to mind is a mismatch of "lme4" and "Matri

    Mark> This same code works on a Macintosh. So it doesn't     Mark> seem that I have made an error in my code.

correct; I can also fit the model nice and quickly on Linux, and summary() confirms the same fit {with the "usual problem" of different estimates for the degrees of freedoms 'df'}.

So currently the bug only shows on the Windows platform. Could it be that you have a mismatching package "Matrix" version there, but not on the Mac?

    Mark> Also if anyone of the random effect terms is removed there is     Mark> no problem. Is this something that is being looked at?

not yet, AFAIK.

    Mark> Or I have I made a mistake somewhere? I have included     Mark> the data that I am using below.

I'm putting the data and an R script up for FTP, so that you or others can run this ``from anywhere'' via

 source("", echo = TRUE)

Maybe this helps diagnosis,
Martin Maechler mailing list PLEASE do read the posting guide! Received on Fri Sep 30 17:29:23 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:40:34 EST