Skip to content
Prev 1260 / 20628 Next

segfaults from lmer on a 64-bit system

Thanks much for looking into this, Doug. 

I recognize that what I'm doing here may seem odd.  My hope was to adapt
the package to a non-standard purpose of mine.  For this purpose, the
variances of the random effects are not of central interest, and it's OK
if they (those variances) are not particularly well estimated.  I found
encouragement in Gelman and Hill's regression book (\S 12.9, pp.275 ff),
which says it's a mistake to think that multilevel models require a
minimum number of groups.  As they put it, the issue is just that when
the number of groups is small then the random-effects variances will
tend to be overestimated.  For my purposes, that would have been OK. 

You suggest only modeling the intercept as random, given that I've only
got four groups.  For my particular purposes, that isn't an option.
Could lmer be expected to better handle my (admittedly ornate) random
effects specfication if there were more groups than 4 -- say, 6 or 8?

Thanks again for the attention.

Ben

Ben B. Hansen
Assistant Professor
Statistics Department and Institute for Social Research
www.stat.lsa.umich.edu/~bbh/
University of Michigan
Ann Arbor, MI 48109-1107


-----Original Message-----
From: dmbates at gmail.com [mailto:dmbates at gmail.com] On Behalf Of Douglas
Bates
Sent: Thursday, August 14, 2008 5:08 AM
To: Hansen, Ben
Cc: r-sig-mixed-models at r-project.org; Caird, Andrew J
Subject: Re: [R-sig-ME] segfaults from lmer on a 64-bit system

Thanks for sending the data and the formula, Ben.

I have good news and bad news.  The good news is that I was able to
get consistent behavior on this example from different systems.  The
bad news is that I did so by having R segfault on a Mac.

I'm not sure exactly where the segfault occurs but the underlying
problem is your random effects specification.  You are specifying a
huge number of random effects (27 terms, some of which may correspond
to more than one random effect) for each level of the grouping factor,
by.var, which has only 4 levels.  You are trying to estimate something
like 380 variances or covariances from 4 groups.

Specifying the random effects is not simply a matter of incorporating
every fixed effect as a random effects and allowing a general
variance-covariance structure.  In this case about the best that you
can hope to include with only 4 levels of the grouping factor is
(1|by.var).
On Thu, Aug 14, 2008 at 5:21 AM, Ben Hansen <bbh at umich.edu> wrote:
persists.
given in
data=mydata)
LC_CTYPE=en_US.UTF-8;LC_NUMERIC=C;LC_TIME=en_US.UTF-8;LC_COLLATE=en_US.U
TF-8
;LC_MONETARY=C;LC_MESSAGES=en_US.UTF-8;LC_PAPER=en_US.UTF-8;LC_NAME=C;LC
_ADD
version
(I
least)
packages.
with
I'm
Using
However,
with
fails
few
variants