Hi all,
I have recently tried changing the distribution family of my brm model from the default to hurdle_gamma(), see model below:
mentalStHurdle <- brm(formula = Inaccuracy ~ lg10JerksZ*mentalState*lg10OwnStimDiff_jerkZ +
(1 + lg10JerksZ*lg10OwnStimDiff_jerkZ*mentalState || allVidIDs) +
(1 + lg10JerksZ*lg10OwnStimDiff_jerkZ*mentalState || allSubs),
data = db, family = hurdle_gamma(),
warmup = 1000, iter = 4000,
cores = options(mc.cores = parallel::detectCores()),
chains = 4, control = list(adapt_delta = .99),
prior = prior1, sample_prior = TRUE,
save_all_pars = TRUE)
Previously, when I ran the model with the default (gaussian) family it ran without any problems. Now with hurdle_gamma specified it doesnβt run at all.
First I see this error come up:
Error in withCallingHandlers(expr, warning = function(w) if (inherits(w, :
'list' object cannot be coerced to type 'double'
When I try running again for good luck (without changing anything), I see the stan starting message for what seems like ages:
Compiling Stan program...
until I eventually get this (error?) message:
make cmd is
make -f '/Library/Frameworks/R.framework/Resources/etc/Makeconf' -f '/Library/Frameworks/R.framework/Resources/share/make/shlib.mk' -f '/Users/bianca/.R/Makevars' CXX='$(CXX14) $(CXX14STD)' CXXFLAGS='$(CXX14FLAGS)' CXXPICFLAGS='$(CXX14PICFLAGS)' SHLIB_LDFLAGS='$(SHLIB_CXX14LDFLAGS)' SHLIB_LD='$(SHLIB_CXX14LD)' SHLIB='file28b5f49a0a6.so' OBJECTS='file28b5f49a0a6.o'
make would use
/usr/local/opt/llvm/bin/clang++ -std=gnu++14 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I"/Library/Frameworks/R.framework/Versions/4.0/Resources/library/Rcpp/include/" -I"/Library/Frameworks/R.framework/Versions/4.0/Resources/library/RcppEigen/include/" -I"/Library/Frameworks/R.framework/Versions/4.0/Resources/library/RcppEigen/include/unsupported" -I"/Library/Frameworks/R.framework/Versions/4.0/Resources/library/BH/include" -I"/Library/Frameworks/R.framework/Versions/4.0/Resources/library/StanHeaders/include/src/" -I"/Library/Frameworks/R.framework/Versions/4.0/Resources/library/StanHeaders/include/" -I"/Library/Frameworks/R.framework/Versions/4.0/Resources/library/RcppParallel/include/" -I"/Users/bianca/Library/R/4.0/library/rstan/include" -DEIGEN_NO_DEBUG -DBOOST_DISABLE_ASSERTS -DBOOST_PENDING_INTEGER_LOG2_HPP -DSTAN_THREADS -DBOOST_NO_AUTO_PTR -include '/Library/Frameworks/R.framework/Versions/4.0/Resources/library/StanHeaders/include/stan/math/prim/mat/fun/Eigen.hpp' -D_REENTRANT -DRCPP_PARALLEL_USE_TBB=1 -isystem "/usr/local/opt/llvm/include" -isysroot "/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk" -fPIC -Wall -g -O2 -c file28b5f49a0a6.cpp -o file28b5f49a0a6.o
if test "zfile28b5f49a0a6.o" != "z"; then \
echo /usr/local/opt/llvm/bin/clang++ -std=gnu++14 -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module -multiply_defined suppress -L"/Library/Frameworks/R.framework/Resources/lib" -L"/usr/local/opt/llvm/lib" -L"/usr/local/Cellar/gettext/0.21/lib" --sysroot="/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk" -o file28b5f49a0a6.so file28b5f49a0a6.o '/Users/bianca/Library/R/4.0/library/rstan/lib//libStanServices.a' -L'/Library/Frameworks/R.framework/Versions/4.0/Resources/library/StanHeaders/lib/' -lStanHeaders -L'/Library/Frameworks/R.framework/Versions/4.0/Resources/library/RcppParallel/lib/' -ltbb -ltbbmalloc -ltbbmalloc_proxy -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework -Wl,CoreFoundation; \
/usr/local/opt/llvm/bin/clang++ -std=gnu++14 -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module -multiply_defined suppress -L"/Library/Frameworks/R.framework/Resources/lib" -L"/usr/local/opt/llvm/lib" -L"/usr/local/Cellar/gettext/0.21/lib" --sysroot="/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk" -o file28b5f49a0a6.so file28b5f49a0a6.o '/Users/bianca/Library/R/4.0/library/rstan/lib//libStanServices.a' -L'/Library/Frameworks/R.framework/Versions/4.0/Resources/library/StanHeaders/lib/' -lStanHeaders -L'/Library/Frameworks/R.framework/Versions/4.0/Resources/library/RcppParallel/lib/' -ltbb -ltbbmalloc -ltbbmalloc_proxy -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework -Wl,CoreFoundation; \
fi
I have no idea what this all means, so would really appreciate any help!
In case it is of any help, here is my session info:
> session_info()
β Session info βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
setting value
version R version 4.0.2 (2020-06-22)
os macOS Catalina 10.15.6
system x86_64, darwin17.0
ui RStudio
language (EN)
collate en_GB.UTF-8
ctype en_GB.UTF-8
tz Europe/London
date 2020-10-03
β Packages βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
package * version date lib source
abind 1.4-5 2016-07-21 [2] CRAN (R 4.0.2)
afex * 0.28-0 2020-09-20 [2] CRAN (R 4.0.2)
arrayhelpers 1.1-0 2020-02-04 [2] CRAN (R 4.0.2)
assertthat 0.2.1 2019-03-21 [2] CRAN (R 4.0.2)
backports 1.1.10 2020-09-15 [2] CRAN (R 4.0.2)
base64enc 0.1-3 2015-07-28 [2] CRAN (R 4.0.2)
bayesplot 1.7.2 2020-05-28 [2] CRAN (R 4.0.2)
blob 1.2.1 2020-01-20 [2] CRAN (R 4.0.2)
boot 1.3-25 2020-04-26 [2] CRAN (R 4.0.2)
bridgesampling 1.0-0 2020-02-26 [2] CRAN (R 4.0.2)
brms * 2.13.5 2020-07-31 [2] CRAN (R 4.0.2)
Brobdingnag 1.2-6 2018-08-13 [2] CRAN (R 4.0.2)
broom * 0.7.0 2020-07-09 [2] CRAN (R 4.0.2)
callr 3.4.4 2020-09-07 [2] CRAN (R 4.0.2)
car 3.0-9 2020-08-11 [2] CRAN (R 4.0.2)
carData 3.0-4 2020-05-22 [2] CRAN (R 4.0.2)
cellranger 1.1.0 2016-07-27 [2] CRAN (R 4.0.2)
cli 2.0.2 2020-02-28 [2] CRAN (R 4.0.2)
coda 0.19-3 2019-07-05 [2] CRAN (R 4.0.2)
codetools 0.2-16 2018-12-24 [2] CRAN (R 4.0.2)
colorspace 1.4-1 2019-03-18 [2] CRAN (R 4.0.2)
colourpicker 1.1.0 2020-09-14 [2] CRAN (R 4.0.2)
crayon 1.3.4 2017-09-16 [2] CRAN (R 4.0.2)
crosstalk 1.1.0.1 2020-03-13 [2] CRAN (R 4.0.2)
curl 4.3 2019-12-02 [2] CRAN (R 4.0.1)
data.table * 1.13.0 2020-07-24 [2] CRAN (R 4.0.2)
DBI 1.1.0 2019-12-15 [2] CRAN (R 4.0.2)
dbplyr 1.4.4 2020-05-27 [2] CRAN (R 4.0.2)
desc 1.2.0 2018-05-01 [2] CRAN (R 4.0.2)
devtools * 2.3.2 2020-09-18 [2] CRAN (R 4.0.2)
digest 0.6.25 2020-02-23 [2] CRAN (R 4.0.2)
distributional 0.2.0 2020-08-03 [2] CRAN (R 4.0.2)
dplyr * 1.0.2 2020-08-18 [2] CRAN (R 4.0.2)
DT 0.15 2020-08-05 [2] CRAN (R 4.0.2)
dygraphs 1.1.1.6 2018-07-11 [2] CRAN (R 4.0.2)
ellipsis 0.3.1 2020-05-15 [2] CRAN (R 4.0.2)
fansi 0.4.1 2020-01-08 [2] CRAN (R 4.0.2)
farver 2.0.3 2020-01-16 [2] CRAN (R 4.0.2)
fastmap 1.0.1 2019-10-08 [2] CRAN (R 4.0.2)
forcats * 0.5.0 2020-03-01 [2] CRAN (R 4.0.2)
foreign 0.8-80 2020-05-24 [2] CRAN (R 4.0.2)
fs 1.5.0 2020-07-31 [2] CRAN (R 4.0.2)
generics 0.0.2 2018-11-29 [2] CRAN (R 4.0.2)
GGally 2.0.0 2020-06-06 [2] CRAN (R 4.0.2)
ggdist 2.2.0 2020-07-12 [2] CRAN (R 4.0.2)
ggmcmc * 1.5.0 2020-08-29 [2] CRAN (R 4.0.2)
ggplot2 * 3.3.2 2020-06-19 [2] CRAN (R 4.0.2)
ggridges * 0.5.2 2020-01-12 [2] CRAN (R 4.0.2)
ggthemes * 4.2.0 2019-05-13 [2] CRAN (R 4.0.2)
glue 1.4.2 2020-08-27 [2] CRAN (R 4.0.2)
gridExtra 2.3 2017-09-09 [2] CRAN (R 4.0.2)
gtable 0.3.0 2019-03-25 [2] CRAN (R 4.0.2)
gtools 3.8.2 2020-03-31 [2] CRAN (R 4.0.2)
haven 2.3.1 2020-06-01 [2] CRAN (R 4.0.2)
HDInterval * 0.2.2 2020-05-23 [2] CRAN (R 4.0.2)
hms 0.5.3 2020-01-08 [2] CRAN (R 4.0.2)
htmltools 0.5.0 2020-06-16 [2] CRAN (R 4.0.2)
htmlwidgets 1.5.1 2019-10-08 [2] CRAN (R 4.0.2)
httpuv 1.5.4 2020-06-06 [2] CRAN (R 4.0.2)
httr 1.4.2 2020-07-20 [2] CRAN (R 4.0.2)
igraph 1.2.5 2020-03-19 [2] CRAN (R 4.0.2)
inline 0.3.16 2020-09-06 [2] CRAN (R 4.0.2)
jsonlite 1.7.1 2020-09-07 [2] CRAN (R 4.0.2)
later 1.1.0.1 2020-06-05 [2] CRAN (R 4.0.2)
lattice 0.20-41 2020-04-02 [2] CRAN (R 4.0.2)
lifecycle 0.2.0 2020-03-06 [2] CRAN (R 4.0.2)
lme4 * 1.1-23 2020-04-07 [2] CRAN (R 4.0.1)
lmerTest * 3.1-2 2020-04-08 [2] CRAN (R 4.0.2)
loo 2.3.1 2020-07-14 [2] CRAN (R 4.0.2)
lubridate 1.7.9 2020-06-08 [2] CRAN (R 4.0.2)
magrittr 1.5 2014-11-22 [2] CRAN (R 4.0.2)
markdown 1.1 2019-08-07 [2] CRAN (R 4.0.2)
MASS 7.3-51.6 2020-04-26 [2] CRAN (R 4.0.2)
Matrix * 1.2-18 2019-11-27 [2] CRAN (R 4.0.2)
matrixStats 0.57.0 2020-09-25 [2] CRAN (R 4.0.2)
memoise 1.1.0 2017-04-21 [2] CRAN (R 4.0.2)
mime 0.9 2020-02-04 [2] CRAN (R 4.0.2)
miniUI 0.1.1.1 2018-05-18 [2] CRAN (R 4.0.2)
minqa 1.2.4 2014-10-09 [2] CRAN (R 4.0.2)
modelr 0.1.8 2020-05-19 [2] CRAN (R 4.0.2)
munsell 0.5.0 2018-06-12 [2] CRAN (R 4.0.2)
mvtnorm 1.1-1 2020-06-09 [2] CRAN (R 4.0.2)
nlme 3.1-148 2020-05-24 [2] CRAN (R 4.0.2)
nloptr 1.2.2.2 2020-07-02 [2] CRAN (R 4.0.2)
numDeriv 2016.8-1.1 2019-06-06 [2] CRAN (R 4.0.2)
openxlsx 4.2.2 2020-09-17 [2] CRAN (R 4.0.2)
pillar 1.4.6 2020-07-10 [2] CRAN (R 4.0.2)
pkgbuild 1.1.0 2020-07-13 [2] CRAN (R 4.0.2)
pkgconfig 2.0.3 2019-09-22 [2] CRAN (R 4.0.2)
pkgload 1.1.0 2020-05-29 [2] CRAN (R 4.0.2)
plyr * 1.8.6 2020-03-03 [2] CRAN (R 4.0.2)
prettyunits 1.1.1 2020-01-24 [2] CRAN (R 4.0.2)
processx 3.4.4 2020-09-03 [2] CRAN (R 4.0.2)
promises 1.1.1 2020-06-09 [2] CRAN (R 4.0.2)
ps 1.3.4 2020-08-11 [2] CRAN (R 4.0.2)
purrr * 0.3.4 2020-04-17 [2] CRAN (R 4.0.2)
R6 2.4.1 2019-11-12 [2] CRAN (R 4.0.2)
RColorBrewer * 1.1-2 2014-12-07 [2] CRAN (R 4.0.2)
Rcpp * 1.0.5 2020-07-06 [2] CRAN (R 4.0.2)
RcppParallel 5.0.2 2020-06-24 [2] CRAN (R 4.0.2)
readr * 1.3.1 2018-12-21 [2] CRAN (R 4.0.2)
readxl 1.3.1 2019-03-13 [2] CRAN (R 4.0.2)
remotes 2.2.0 2020-07-21 [2] CRAN (R 4.0.2)
reprex 0.3.0 2019-05-16 [2] CRAN (R 4.0.2)
reshape 0.8.8 2018-10-23 [2] CRAN (R 4.0.2)
reshape2 1.4.4 2020-04-09 [2] CRAN (R 4.0.2)
rio 0.5.16 2018-11-26 [2] CRAN (R 4.0.2)
rlang 0.4.7 2020-07-09 [2] CRAN (R 4.0.2)
rprojroot 1.3-2 2018-01-03 [2] CRAN (R 4.0.2)
rsconnect 0.8.16 2019-12-13 [2] CRAN (R 4.0.2)
rstan * 2.21.2 2020-07-27 [1] CRAN (R 4.0.2)
rstantools 2.1.1 2020-07-06 [2] CRAN (R 4.0.2)
rstudioapi 0.11 2020-02-07 [2] CRAN (R 4.0.2)
rvest 0.3.6 2020-07-25 [2] CRAN (R 4.0.2)
scales 1.1.1 2020-05-11 [2] CRAN (R 4.0.2)
Select * 1.4 2018-05-11 [2] CRAN (R 4.0.2)
sessioninfo 1.1.1 2018-11-05 [2] CRAN (R 4.0.2)
shiny 1.5.0 2020-06-23 [2] CRAN (R 4.0.2)
shinyjs 2.0.0 2020-09-09 [2] CRAN (R 4.0.2)
shinystan 2.5.0 2018-05-01 [2] CRAN (R 4.0.2)
shinythemes 1.1.2 2018-11-06 [2] CRAN (R 4.0.2)
StanHeaders * 2.21.0-6 2020-08-16 [2] CRAN (R 4.0.2)
statmod 1.4.34 2020-02-17 [2] CRAN (R 4.0.2)
stringi 1.5.3 2020-09-09 [2] CRAN (R 4.0.2)
stringr * 1.4.0 2019-02-10 [2] CRAN (R 4.0.2)
svUnit 1.0.3 2020-04-20 [2] CRAN (R 4.0.2)
testthat 2.3.2 2020-03-02 [2] CRAN (R 4.0.2)
threejs 0.3.3 2020-01-21 [2] CRAN (R 4.0.2)
tibble * 3.0.3 2020-07-10 [2] CRAN (R 4.0.2)
tidybayes * 2.1.1 2020-06-19 [2] CRAN (R 4.0.2)
tidyr * 1.1.2 2020-08-27 [2] CRAN (R 4.0.2)
tidyselect 1.1.0 2020-05-11 [2] CRAN (R 4.0.2)
tidyverse * 1.3.0 2019-11-21 [2] CRAN (R 4.0.2)
usethis * 1.6.3 2020-09-17 [2] CRAN (R 4.0.2)
V8 3.2.0 2020-06-19 [2] CRAN (R 4.0.2)
vctrs 0.3.4 2020-08-29 [2] CRAN (R 4.0.2)
viridis * 0.5.1 2018-03-29 [2] CRAN (R 4.0.2)
viridisLite * 0.3.0 2018-02-01 [2] CRAN (R 4.0.1)
wesanderson * 0.3.6 2018-04-20 [2] CRAN (R 4.0.2)
withr 2.3.0 2020-09-22 [2] CRAN (R 4.0.2)
xml2 1.3.2 2020-04-23 [2] CRAN (R 4.0.2)
xtable 1.8-4 2019-04-21 [2] CRAN (R 4.0.2)
xts 0.12.1 2020-09-09 [2] CRAN (R 4.0.2)
zip * 2.1.1 2020-08-27 [2] CRAN (R 4.0.2)
zoo 1.8-8 2020-05-02 [2] CRAN (R 4.0.2)
[1] /Users/bianca/Library/R/4.0/library
[2] /Library/Frameworks/R.framework/Versions/4.0/Resources/library