Short summary of the problem
Dear all,
Sorry to interrupt you, I am writing this letter to ask for your help.
I am running a Bayesian power analysis using the {brms} in a Server with Linux environment. But for some reason, when I run my Rmd
script now (did not happen before) it tries to compile a foo.c
file when running brms
/ Stan
and it fails. But then, compiling the model with g++
works. So in short, I get the below error msg printed in the output from Rmd
every time I try to run brms
:
“/export/scratch1/home/xiongbin/soft/conda/envs/r-environment/lib/R/library/RcppEigen/include/Eigen/Core:96:10: fatal error: complex: No such file or directory
96 | #include
| ^~~~~~~~~
compilation terminated.
make: *** [/export/scratch1/home/xiongbin/soft/conda/envs/r-environment/lib/R/etc/Makeconf:169: foo.o] Error 1
Error in dyn.load(libLFile) :
unable to load shared object ‘/tmp/RtmpGy9tuO/file4d1b36c42348.so’:
/tmp/RtmpGy9tuO/file4d1b36c42348.so: failed to map segment from shared object: Operation not permitted
Error in sink(type = “output”) : invalid connection”
However, it should be noted that my script runs very well in a Windows system, just because I wanted to speed up my Bayesian power analysis, I used a Server.
code_to_run_your_model(if_applicable)
I am sorry that I can only provide a piece of my code and I must modify the code to hide some information, as I have preregistered for my study but haven't run it yet. Please see following:
m1 <-
brms::brm(data = MyData,
family = binomial,
choice|trials(1) ~ 0 + condition + (0 + condition | subjID),
prior = c(prior(normal(2.5, 0.3),
class = b, coef = condition1),
prior(normal(2.5, 0.3),
class = b, coef = condition2),
prior(normal(2.5, 0.3),
class = b, coef = condition3),
prior(normal(2.5, 0.3),
class = b, coef = condition4),
prior(normal(0, 0.6), class = sd),
prior(lkj(3), class = cor)),
iter = 2000,
warmup = 1000,
chains = 4,
cores = 4,
seed = 9513,
sample_prior = "only")
If possible, add also code to simulate data or attach a (subset of) the dataset you work with.
Please also provide the following information in addition to your question:
* Operating System: Linux version 3.10.0-1127.19.1.el7.x86_64 (mockbuild@kbuilder.bsys.centos.org) (gcc version 4.8.5 20150623 (Red Hat 4.8.5-39)
* brms Version: brms version 2.14.4
Looking forward to your topic!