Hi, I am trying to install brms package on my Linux R server. Below is the specification of my platform:
platform x86_64-pc-linux-gnu
arch x86_64
os linux-gnu
system x86_64, linux-gnu
status
major 3
minor 6.3
year 2020
month 02
day 29
svn rev 77875
language R
version.string R version 3.6.3 (2020-02-29)
nickname Holding the Windsock
In order to install the brms package I am using below installation command:
Error in .shlib_internal(args) :
C++14 standard requested but CXX14 is not defined
* removing â/opt/R/3.6.3/rstanâ
Warning in install.packages :
installation of package ârstanâ had non-zero exit status
It would be very helpful if someone could support me. My objective is to use âbrmâ function.
Thanks for the prompt response John. I have made the changes to CXX14 as asked. Attached is a slightly detailed error log. I copied few lines from the console and pasted in notepad so that it is easily readable.Please start reading from the end. Error Log.txt (39.4 KB)
Thank you once again for your support :)
Ohh if that is the case platform update could take time. However, meanwhile can I use cmdstanr to use brm function? I used your suggestion you mention earier about incorporating backend=âcmdstanrâ. Below is how my brm block looks:
library(cmdstanr)
bmod1 <- brm(COS_NRX_PSO ~
lag.1.COMPNRX+adstock_samples_5_50_NT +
adstock_samples_5_50_ST + adstock_samples_5_50_T1+
adstock_samples_5_50_T2, data = rawdb1,
family = gaussian("log"),
warmup = 100, iter = 1000, chains = 4,prior= prior2,
control = list(adapt_delta = 0.95), seed=150,
cores = parallel::detectCores(),backend="cmdstanr")
Just a guess, but wouldnât some older versions of rstan work with g++ 4.8.5? (one would then probably also need an older version of brms). If @Sham414 doesnât need anything fancy, this could as well not be a big issueâŚ
Hi @martinmodrak, thank you so much for the suggestion. How can I find an older version of rstan and brms which would work with my existing g++ 4.8.5? I only need to use brm function. My objective is to run bayesian regression model with priors.
It looks like the c++14 requirement was introduced in 2.17, so you would need to need install the Rstan and StanHeaders packages from those times (around four years old now!).
And it looks like the brms version from this time was 1.8.0, install via:
devtools::install_version("brms",version="1.8.0")
Note that these are quite outdated, so your models will likely be slower. And there may be aspects of your syntax that werenât supported at this time, so you may not be able to run the model that you want.
Thank you so much, but I requested the server admin to update the compiler and install brms. The brms installation is successfull but when I am runnning the brm function I am facing errors.
Below are my codes:
library(brms)
bmod1 <- brm(COS_NRX_PSO ~
lag.1.COMPNRX+adstock_samples_5_50_NT +
adstock_samples_5_50_ST + adstock_samples_5_50_T1+
adstock_samples_5_50_T2, data = rawdb1,
family = gaussian("log"),
warmup = 100, iter = 1000, chains = 4,prior= prior2,
control = list(adapt_delta = 0.95), seed=150,
cores = parallel::detectCores())