-
Notifications
You must be signed in to change notification settings - Fork 122
Open
Description
Hello,
I'm running the model ts_par4, ts_par6, and ts_par7 on my dataset. I successfully ran ts_par4 and ts_par6 on Friday, but when I try to run the ts_par7 today I had the following error.
Warning: 'length(x) = 109932 > 1' in coercion to 'logical(1)'Warning: 'length(x) = 109932 > 1' in coercion to 'logical(1)'
Model name = ts_par7
Details:
# of chains = 4
# of cores used = 8
# of MCMC samples (per chain) = 4000
# of burn-in samples = 1000
# of subjects = 146
# of (max) trials per subject = 200
`trans_prob` is set to = 0.7
make cmd is
make -f '/Library/Frameworks/R.framework/Resources/etc/Makeconf' -f '/Library/Frameworks/R.framework/Resources/share/make/shlib.mk' CXX='$(CXX17) $(CXX17STD)' CXXFLAGS='$(CXX17FLAGS)' CXXPICFLAGS='$(CXX17PICFLAGS)' SHLIB_LDFLAGS='$(SHLIB_CXX17LDFLAGS)' SHLIB_LD='$(SHLIB_CXX17LD)' SHLIB='file1089b65346e51.so' OBJECTS='file1089b65346e51.o'
make would use
clang++ -arch arm64 -std=gnu++17 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I"/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/Rcpp/include/" -I"/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/RcppEigen/include/" -I"/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/RcppEigen/include/unsupported" -I"/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/BH/include" -I"/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/StanHeaders/include/src/" -I"/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/StanHeaders/include/" -I"/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/RcppParallel/include/" -I"/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/rstan/include" -DEIGEN_NO_DEBUG -DBOOST_DISABLE_ASSERTS -DBOOST_PENDING_INTEGER_LOG2_HPP -DSTAN_THREADS -DUSE_STANC3 -DSTRICT_R_HEADERS -DBOOST_PHOENIX_NO_VARIADIC_EXPRESSION -D_HAS_AUTO_PTR_ETC=0 -include '/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/StanHeaders/include/stan/math/prim/fun/Eigen.hpp' -D_REENTRANT -DRCPP_PARALLEL_USE_TBB=1 -I/opt/R/arm64/include -fPIC -falign-functions=64 -Wall -g -O2 -c file1089b65346e51.cpp -o file1089b65346e51.o
if test "zfile1089b65346e51.o" != "z"; then \
echo clang++ -arch arm64 -std=gnu++17 -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module -multiply_defined suppress -L"/Library/Frameworks/R.framework/Resources/lib" -L/opt/R/arm64/lib -o file1089b65346e51.so file1089b65346e51.o '/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/rstan/lib//libStanServices.a' -L'/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/StanHeaders/lib/' -lStanHeaders -L'/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/RcppParallel/lib/' -ltbb -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework -Wl,CoreFoundation; \
clang++ -arch arm64 -std=gnu++17 -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module -multiply_defined suppress -L"/Library/Frameworks/R.framework/Resources/lib" -L/opt/R/arm64/lib -o file1089b65346e51.so file1089b65346e51.o '/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/rstan/lib//libStanServices.a' -L'/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/StanHeaders/lib/' -lStanHeaders -L'/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/RcppParallel/lib/' -ltbb -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework -Wl,CoreFoundation; \
fi
Error in compileCode(f, code, language = language, verbose = verbose) :
In file included from <built-in>:1:In file included from /Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/StanHeaders/include/stan/math/prim/fun/Eigen.hpp:22:In file included from /Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/RcppEigen/include/Eigen/Dense:1:In file included from /Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/RcppEigen/include/Eigen/Core:19:/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/RcppEigen/include/Eigen/src/Core/util/Macros.h:679:10: fatal error: 'cmath' file not found 679 | #include <cmath> | ^~~~~~~1 error generated.make: *** [file1089b65346e51.o] Error 1
Error in sink(type = "output") : invalid connection
I have tried to run ts_par4 ts_par6 and I get the same error messages (which I did not get on Friday).
This is the code I am using to create the df, rename the columns and run ts_par7
# select only the relevant columns for modelling
df <- data %>%
select(subject_id, stim_selected_stage1, stim_selected_stage2, reward)
# give the appropriate column names
colnames(df) <- c("subjID", "level1_choice", "level2_choice", "reward")
# recode values in the columns
df <- df %>%
mutate(
level1_choice = if_else(level1_choice==0,1,2),
level2_choice = if_else(level2_choice==2,1,if_else(level2_choice==3,2,if_else(level2_choice==4,3,4)))
)
# Run the model w
output_tspar7 <- ts_par7(
data = df, niter = 4000, nwarmup = 1000, nchain = 4, ncore = 8)
Does anyone know what I need to change?
Many thanks,
Nico
Metadata
Metadata
Assignees
Labels
No labels