[R-sig-ME] getME function crashes

Ben Bolker bbolker at gmail.com
Thu Nov 7 18:32:40 CET 2013


  This are the exact symptoms of having a mismatch between your Matrix,
RcppEigen, and lme4 versions ... try reinstalling them in that order.

  Ben Bolker

On 13-11-07 11:43 AM, lancelot wrote:
> everything's fine for me with the development version of lme4 (github)
> 
>> library(arm)
> Le chargement a nécessité le package : MASS
> Le chargement a nécessité le package : Matrix
> Le chargement a nécessité le package : lme4
> Le chargement a nécessité le package : lattice
> 
> arm (Version 1.6-09, built: 2013-9-23)
> 
> Working directory is D:/Analyses
> 
>> library(lme4)
>> set.seed (1)
>> J <- 15
>> n <- J*(J+1)/2
>> group <- rep (1:J, 1:J)
>> mu.a <- 5
>> sigma.a <- 2
>> a <- rnorm (J, mu.a, sigma.a)
>> b <- -3
>> x <- rnorm (n, 2, 1)
>> y <- rbinom (n, 1, invlogit (a[group] + b*x))
>> mod <- glmer (y ~ x + (1 | group), family=binomial(link="logit"))
>> getME(mod, "L")
> 'MatrixFactorization' of Formal class 'dCHMsimpl' [package "Matrix"]
> with 10 slots
>   ..@ x       : num [1:15] 1.22 1.22 1.1 1.44 1.74 ...
>   ..@ p       : int [1:16] 0 1 2 3 4 5 6 7 8 9 ...
>   ..@ i       : int [1:15] 0 1 2 3 4 5 6 7 8 9 ...
>   ..@ nz      : int [1:15] 1 1 1 1 1 1 1 1 1 1 ...
>   ..@ nxt     : int [1:17] 1 2 3 4 5 6 7 8 9 10 ...
>   ..@ prv     : int [1:17] 16 0 1 2 3 4 5 6 7 8 ...
>   ..@ colcount: int [1:15] 1 1 1 1 1 1 1 1 1 1 ...
>   ..@ perm    : int [1:15] 0 1 2 3 4 5 6 7 8 9 ...
>   ..@ type    : int [1:4] 2 1 0 1
>   ..@ Dim     : int [1:2] 15 15
>> sessionInfo()
> R version 3.0.2 (2013-09-25)
> Platform: i386-w64-mingw32/i386 (32-bit)
> 
> locale:
> [1] LC_COLLATE=French_France.1252  LC_CTYPE=French_France.1252
> [3] LC_MONETARY=French_France.1252 LC_NUMERIC=C
> [5] LC_TIME=French_France.1252
> 
> attached base packages:
> [1] stats     graphics  grDevices utils     datasets  methods   base
> 
> other attached packages:
> [1] arm_1.6-09      lme4_1.1-1      lattice_0.20-25 Matrix_1.1-0
> MASS_7.3-29
> 
> loaded via a namespace (and not attached):
> [1] abind_1.4-1    coda_0.16-1    fortunes_1.5-1 grid_3.0.2
> minqa_1.2.1    nlme_3.1-111
> [7] splines_3.0.2  tools_3.0.2
> 
> 
> Idem with the 64-bit version of R
> 
> Renaud
> 
> 
> 
> 
> Le 07/11/2013 17:31, Johannes Radinger a écrit :
>> Hi,
>>
>> Actually I tried to use the sim function from the package "arm" to get
>> posterior simulations of beta from a merMod.
>> But somehow this function crashed and I could trace the problem back
>> to the
>> function getME(model,"L") which is
>> the cause for the crash.
>> For example here an example dataset for a binomial model (glmer) from the
>> sim function in the 'arm'-package:
>>
>> set.seed (1)
>> J<- 15
>> n<- J*(J+1)/2
>> group<- rep (1:J, 1:J)
>> mu.a<- 5
>> sigma.a<- 2
>> a<- rnorm (J, mu.a, sigma.a)
>> b<- -3
>> x<- rnorm (n, 2, 1)
>> y<- rbinom (n, 1, invlogit (a[group] + b*x))
>>
>> mod<- glmer (y ~ x + (1 | group), family=binomial(link="logit"))
>>
>> When I now run getME(mod, "L") my R session completely crashes with
>> following error:
>> *** caught segfault ***
>> address (nil), cause 'memory not mapped'
>>
>> Traceback:
>>   1: .Call(merPredDL, ptr())
>>   2: PR$L()
>>   3: getME(mod, "L")
>>
>> Possible actions:
>> 1: abort (with core dump, if enabled)
>> 2: normal R exit
>> 3: exit R without saving workspace
>> 4: exit R saving workspace
>>
>> I am running following setup:
>>
>> R version 3.0.2 (2013-09-25)
>> Platform: i686-pc-linux-gnu (32-bit)
>>
>> locale:
>>   [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C
>> LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8
>>   [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8
>> LC_PAPER=en_US.UTF-8       LC_NAME=C
>>   [9] LC_ADDRESS=C               LC_TELEPHONE=C
>> LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
>>
>> attached base packages:
>> [1] stats     graphics  grDevices utils     datasets  methods   base
>>
>> other attached packages:
>> [1] arm_1.6-09      lme4_1.0-5      lattice_0.20-24 Matrix_1.1-0
>> MASS_7.3-29
>>
>> loaded via a namespace (and not attached):
>> [1] abind_1.4-0   coda_0.16-1   grid_3.0.2    minqa_1.2.1   nlme_3.1-111
>> splines_3.0.2 tools_3.0.2
>>
>> Can anyone reproduce this problem?
>>
>> /Johannes
>>
>>     [[alternative HTML version deleted]]
>>
>> _______________________________________________
>> R-sig-mixed-models at r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
>>
>>
>



More information about the R-sig-mixed-models mailing list