Running bms causes a Fatal Error write when the simulation starts:
‘R Session Aborted R encountered a fata error. The session was terminated.’
Error occurs when sampling starts
Compiling Stan program...
Start sampling
SAMPLING FOR MODEL 'c86a9091f1b21a9940887ec8be562538' NOW (CHAIN 1).
The model I used:
original:
m1<- brm(log(betsize) ~ highcontrol + highreward + patient + highcontrol*highreward + patient*highcontrol + patient*highreward + (1|id), data=slot23)
reduced version:
bm1<- brm(log(bet) ~ highcontrol + highreward, data = d)
Originally had a much larger model with almost 8000 observations (and random intercepst), so wondered if it is a memory issue, but now repeated with 150 observations.
Also tried two different computers. Same problem occurs:
Computer 1:
- Operating System: MacOS Ventura 13.4.1
- Processor: 2.4 GHz 8-Core Intel Core i9
- brms Version: 2.19.6
Computer 2:
- Operating System: MacOS Venture 13.4
- Processor: Apple M2
- brms Version: 2.19.6
Some additional info: I tried the regular install of brms via install.packages and the direct install via the GitRepo. The brms package is loading here is the text
> library(brms)
> Loading required package: Rcpp
> Registered S3 method overwritten by 'htmlwidgets':
> method from
> print.htmlwidget tools:rstudio
> Loading 'brms' package (version 2.19.6). Useful instructions
> can be found by typing help('brms'). A more detailed introduction
> to the package is available through vignette('brms_overview').
>
> Attaching package: ‘brms’
>
> The following object is masked from ‘package:stats’:
>
> ar
Also tried what someone suggested in another thread here to run:
library(inline)
example(stan_model, package = "rstan", run.dontrun = TRUE)
This also causes a Fatal Error after successfully Translating and parsing the Stan Model and compiling the C Code.
Really appreciate help here. :-)