[R-sig-ME] Bug report for lme
figurski at mail.med.upenn.edu
Mon Mar 14 16:25:50 CET 2011
Theirry and all,
Thank you for your comments - it is an educative experience for me.
I actually didn't expect the model to work, but I did not expect R to
crash either. So, here I'm reporting the fact that R crashes.
However, I just noticed that when I remove NAs from the data, R 2.12.2
survives and displays the same error message as R 2.11.1 did.
Michal J. Figurski, PhD
HUP, Pathology & Laboratory Medicine
Biomarker Research Laboratory
3400 Spruce St. 7 Maloney S
Philadelphia, PA 19104
tel. (215) 662-3413
On 3/14/2011 10:53 AM, ONKELINX, Thierry wrote:
> SPL has 199 levels. Thus (SPL|Plate:Aliq) requires a 199 x 199 variance-covariance matrix, which is huge.
> Have a look at table(b$SPL, factor(b$Plate:b$Aliq)). Notice that you have many combinations without data.
> Furthermore you have only 6 levels of Plate:Aliq, which is rather low to get good variance estimates.
> Bottomline: your model is to complex for the data you have.
> Best regards,
> ir. Thierry Onkelinx
> Instituut voor natuur- en bosonderzoek
> team Biometrie& Kwaliteitszorg
> Gaverstraat 4
> 9500 Geraardsbergen
> Research Institute for Nature and Forest
> team Biometrics& Quality Assurance
> Gaverstraat 4
> 9500 Geraardsbergen
> tel. + 32 54/436 185
> Thierry.Onkelinx at inbo.be
> To call in the statistician after the experiment is done may be no more than asking him to perform a post-mortem examination: he may be able to say what the experiment died of.
> ~ Sir Ronald Aylmer Fisher
> The plural of anecdote is not data.
> ~ Roger Brinner
> The combination of some data and an aching desire for an answer does not ensure that a reasonable answer can be extracted from a given body of data.
> ~ John Tukey
>> -----Oorspronkelijk bericht-----
>> Van: r-sig-mixed-models-bounces at r-project.org
>> [mailto:r-sig-mixed-models-bounces at r-project.org] Namens
>> Michal Figurski
>> Verzonden: maandag 14 maart 2011 14:34
>> Aan: Douglas Bates
>> CC: R-SIG-Mixed-Models at r-project.org
>> Onderwerp: Re: [R-sig-ME] Bug report for lme
>> It seems that I didn't make myself entirely clear, so here
>> are a few clarifications. I also attach some data and a
>> reproducible example that crashes R - at least on my machine.
>> - "hundreds of lines" - this was actually just one line in
>> R output.
>> This was part of the error message. I selected it and pasted
>> into the email body, and it got converted to multiple
>> lines... I agree this is unlikely to be helpful, though I was
>> not sure, so I pasted the entire error message.
>> - formula with 'paste()' is not a problem to me - I use it
>> daily and it always works. Though for your convenience, in
>> the attached code I used explicit formula - the outcome is
>> unfortunately the same.
>> - my .RData file is not corrupt and R starts normally. It
>> only crashes after I run the problem code.
>> The code to reproduce the error:
>> ***** # # Working example to reproduce crash
>> # Read the data in - replace path with your path
>> b<- read.csv("crash-example.csv")
>> b$Aliq<- factor(b$Aliq)
>> b$SPL<- factor(b$SPL)
>> # 1st example, to show that it works - on a selected set of
>> data # It takes a few moments, but it works - at least it
>> doesn't crash R:
>> bb<- b[b$SPL %in% unique(b$SPL[b$Plate=="TRT1"]),]
>> b.1<- lmer(Conc~SPL + (SPL|Plate:Aliq)-1, data=bb)
>> # 2nd example - it takes only a few seconds and R crashes:
>> # R-version 2.12.2 on Win7 64bit
>> # Package lme4 version 0.999375-39
>> # Previously, when used in R 2.11.1 with lme4 version
>> 0.999375-35, # I got the error that I pasted in the message
>> before, but the R # did not crash.
>> b.2<- lmer(Conc~SPL + (SPL|Plate:Aliq)-1, data=b) #
>> ******************************************************************* #
>> Kind regards,
>> Michal J. Figurski, PhD
>> HUP, Pathology& Laboratory Medicine
>> Biomarker Research Laboratory
>> 3400 Spruce St. 7 Maloney S
>> Philadelphia, PA 19104
>> tel. (215) 662-3413
>> On 3/11/2011 4:00 PM, Douglas Bates wrote:
>>> On Fri, Mar 11, 2011 at 2:32 PM, Michal Figurski
>>> <figurski at mail.med.upenn.edu> wrote:
>>>> Dear Prof. Bates,
>>>> I'm working with a lmer model using your lme4 library version
>>>> 0.999375-35 with R 2.11.1 on Win7 64bit. Shortly after
>> starting the
>>>> function, the R window clears and the following is being displayed:
>>>> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
>> 0, 0, 0, 0,
>>>> 0, 0,
>>> ... Hundreds of lines deleted
>>>> REML = TRUE, verbose = 0L)
>>>> 4: do.call(lmer_finalize, ans)
>>>> 5: lmer(formula(paste(i1, "~SPL + (SPL|Plate:Aliq)-1")),
>> data = a)
>>>> Error in mer_finalize(ans) : caught access violation -
>> continue with
>>>> OK, so I updated R and lme4 to the latest versions, and now R just
>>>> plainly crashes without any message. Let me know if you need
>>>> additional information to troubleshoot.
>>> Well, hundreds, perhaps thousands, of lines of (part of) a
>> dump of an
>>> object are unlikely to be helpful.
>>> To get R working again you probably need to delete the file
>> .RData in
>>> the default directory in which you start R. It is most likely that
>>> you have a corrupt object in the saved worksheet.
>>> Secondly, using paste to create a formula is not a great idea. The
>>> formula may have ended up being unevaluated. If you really
>> do need to
>>> use a character string to name the response variable the preferred
>>> approach is
>>> form<- substitute(foo ~ SPL + (SPL | Plate:Aliq) - 1, list(foo =
>>> as.name(i1))) lmer(form, data=a)
>>> If those suggestions don't help then please provide a reproducible
>>> example and preferrably on less than a gigantic data set.
>>> I am taking the liberty of cc:ing the
>> R-SIG-Mixed-Models at R-project.org
>>> mailing list on this reply. Many of those who read the list may be
>>> able to help you and it is unlikely I will be able to give much
>>> assistance soon because I am travelling for the next 10 days.
More information about the R-sig-mixed-models