An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-sig-mixed-models/attachments/20131107/6cc818d2/attachment.pl>
getME function crashes
6 messages · Johannes Radinger, Renaud Lancelot, Steve Walker +2 more
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
Renaud Lancelot Directeur adjoint / Deputy director http://umr-cmaee.cirad.fr/ http://formation-elevage-suds.cirad.fr/ CIRAD, UMR CMAEE, Campus International de Baillarguet TA A-DIR / B F34398 Montpellier Head of epidemiology team EDENext Project, coordinator: http://www.edenext.eu/ Tel. +33 4 67 59 37 17 - Fax +33 4 67 59 37 98 Secr. +33 4 67 59 37 37 - Cell. +33 6 77 52 08 69
I couldn't reproduce, but that is not entirely surprising with memory bugs. Apart from changing invlogit to plogis, I successfully ran your example with the following session info. The difference could be that I was using a development version of lme4, but I doubt that would make a difference...checking...no, the cran version works for me too. Steve > sessionInfo() R version 3.0.2 (2013-09-25) Platform: x86_64-apple-darwin10.8.0 (64-bit) locale: [1] C attached base packages: [1] stats graphics grDevices utils datasets methods base other attached packages: [1] lme4_1.1-1 Matrix_1.1-0 loaded via a namespace (and not attached): [1] MASS_7.3-29 grid_3.0.2 lattice_0.20-23 minqa_1.2.1 [5] nlme_3.1-111 splines_3.0.2 >
On 11/7/2013, 11:31 AM, Johannes Radinger wrote:
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
Johannes, on Linux-64, with the same version of R and the same version of all loaded packages, your example code runs fine. Apart from Windows-32, the only difference I've spotted is that a module named "tools_3.0.2" does not appear in my sessionInfo(), but that might be platform dependant. Hugo On Thu, 7 Nov 2013 17:31:41 +0100
Johannes Radinger <johannesradinger at gmail.com> wrote:
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
--
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
An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-sig-mixed-models/attachments/20131108/8316a83d/attachment.pl>