- Operating System: Ubuntu 4.15.0-1035-aws
- brms Version: 2.8.0
- rstan Version: 2.18.9
I get a compilation error using brms for some models on a dataset but not others. See below:
// Works
out <- brms::brm(r | trials(n) ~ t,
control = list(adapt_delta = 0.99), cores = 4, iter = 5000, family = binomial(), data =long_dat)
//Works
brms::brm(r | trials(n) ~ t + (-1 + t | study_id),
control = list(adapt_delta = 0.99), cores = 4, iter = 5000, family = binomial(), data = long_dat)
//Error
brms::brm(r | trials(n) ~ t + (1 + t | study_id),
control = list(adapt_delta = 0.99), cores = 4, iter = 5000, family = binomial(), data = long_dat)
Compiling the C++ model
Error in compileCode(f, code, language = language, verbose = verbose) :
Compilation ERROR, function(s)/method(s) not created! In file included from /home/tdisher/nma_validation/packrat/lib/x86_64-pc-linux-gnu/3.5.3/RcppEigen/include/Eigen/Core:383:0,
from /home/tdisher/nma_validation/packrat/lib/x86_64-pc-linux-gnu/3.5.3/RcppEigen/include/Eigen/Dense:1,
from /home/tdisher/nma_validation/packrat/lib/x86_64-pc-linux-gnu/3.5.3/StanHeaders/include/stan/math/prim/mat/fun/Eigen.hpp:4,
from /home/tdisher/nma_validation/packrat/lib/x86_64-pc-linux-gnu/3.5.3/StanHeaders/include/stan/math/rev/mat/fun/Eigen_NumTraits.hpp:4,
from /home/tdisher/nma_validation/packrat/lib/x86_64-pc-linux-gnu/3.5.3/StanHeaders/include/stan/math/rev/core/matrix_vari.hpp:4,
from /home/tdisher/nma_validation/packrat/lib/x86_64-pc-linux-gnu/3.5.3/StanHeaders/include/stan/math/rev/core.hpp:14,
from /home/tdisher/nma_validation/packrat/lib/x86_64-pc-linux-gnu/3.5.3/StanHeaders/includ
In addition: Warning message:
In system(cmd, intern = !verbose) :
running command ‘/usr/lib/R/bin/R CMD SHLIB file28502443d7d7.cpp 2> file28502443d7d7.cpp.err.txt’ had status 1
Error in sink(type = “output”) : invalid connection
I’m assuming I’m making an error somewhere? Tried installing stanheaders. Could it be a packrat issue?