I have tried to run my model with brms and this is the error that I get, I am a first-time user, and I am not sure how to troubleshoot this!
##############################
setwd(“D:/DESKTOP/UCT 2023/R-Final”)
library(ProbBayes)
Loading required package: LearnBayes
Attaching package: ‘LearnBayes’
The following object is masked from ‘package:brms’:
rdirichlet
Loading required package: gridExtra
Loading required package: shiny
library(brms)
library(dplyr)
Attaching package: ‘dplyr’
The following object is masked from ‘package:gridExtra’:
combine
The following objects are masked from ‘package:stats’:
filter, lag
The following objects are masked from ‘package:base’:
intersect, setdiff, setequal, union
library(ggplot2)
practc ← read.csv(“D:/DESKTOP/UCT 2023/R-Final/Imputedpaxdata_CatData.csv”)
colnames(practc) ← c(‘Age’,‘Gender’,‘Education’, ‘NtIndvIncm’, ‘DaysWkMBT’, ‘DlyTxFare’, ‘PrevCFCUse’, ‘CFCPref’)
PracticeBRMS ← practc
#non-informative priors2
fit_CFC_pref ← brm(CFCPref~ Age + Gender + Education + NtIndvIncm + DaysWkMBT + DlyTxFare
-
+ PrevCFCUse, data = PracticeBRMS, family = Gamma("log"))
Compiling Stan program…
make cmd is
make -f “C:/PROGRA~1/R/R-43~1.1/etc/x64/Makeconf” -f “C:/PROGRA~1/R/R-43~1.1/share/make/winshlib.mk” CXX=‘(CXX14) (CXX14STD)’ CXXFLAGS=‘(CXX14FLAGS)' CXXPICFLAGS='(CXX14PICFLAGS)’ SHLIB_LDFLAGS=‘(SHLIB_CXX14LDFLAGS)' SHLIB_LD='(SHLIB_CXX14LD)’ SHLIB=“file14504c8a6ca0.dll” WIN=64 TCLBIN= OBJECTS=“file14504c8a6ca0.o”
make would use
if test “zfile14504c8a6ca0.o” != “z”; then
if test -e “file14504c8a6ca0-win.def”; then
echo g++ -shared -s -static-libgcc -o file14504c8a6ca0.dll file14504c8a6ca0-win.def file14504c8a6ca0.o -L"C:/RBuildTools/4.3/x86_64-w64-mingw32.static.posix/lib/x64" -L"C:/RBuildTools/4.3/x86_64-w64-mingw32.static.posix/lib" -L"C:/PROGRA~1/R/R-43~1.1/bin/x64" -lR ;
g++ -shared -s -static-libgcc -o file14504c8a6ca0.dll file14504c8a6ca0-win.def file14504c8a6ca0.o -L"C:/RBuildTools/4.3/x86_64-w64-mingw32.static.posix/lib/x64" -L"C:/RBuildTools/4.3/x86_64-w64-mingw32.static.posix/lib" -L"C:/PROGRA~1/R/R-43~1.1/bin/x64" -lR ;
else
echo EXPORTS > tmp.def;
nm file14504c8a6ca0.o | sed -n ‘s/^.* [BCDRT] / /p’ | sed -e ‘/[.]refptr[.]/d’ -e ‘/[.]weak[.]/d’ | sed ‘s/[^ ][^ ]*/“&”/g’ >> tmp.def;
echo g++ -shared -s -static-libgcc -o file14504c8a6ca0.dll tmp.def file14504c8a6ca0.o -L"C:/RBuildTools/4.3/x86_64-w64-mingw32.static.posix/lib/x64" -L"C:/RBuildTools/4.3/x86_64-w64-mingw32.static.posix/lib" -L"C:/PROGRA~1/R/R-43~1.1/bin/x64" -lR ;
g++ -shared -s -static-libgcc -o file14504c8a6ca0.dll tmp.def file14504c8a6ca0.o -L"C:/RBuildTools/4.3/x86_64-w64-mingw32.static.posix/lib/x64" -L"C:/RBuildTools/4.3/x86_64-w64-mingw32.static.posix/lib" -L"C:/PROGRA~1/R/R-43~1.1/bin/x64" -lR ;
rm -f tmp.def;
fi
fi
Error in compileCode(f, code, language = language, verbose = verbose) :
C:\RBuildTools\4.3\x86_64-w64-mingw32.static.posix\bin/ld.exe: file14504c8a6ca0.o:file14504c8a6ca0.cpp:(.text$_ZN3tbb8internal26task_scheduler_observer_v3D0Ev[_ZN3tbb8internal26task_scheduler_observer_v3D0Ev]+0x1c): undefined reference to tbb::internal::task_scheduler_observer_v3::observe(bool)'C:\RBuildTools\4.3\x86_64-w64-mingw32.static.posix\bin/ld.exe: file14504c8a6ca0.o:file14504c8a6ca0.cpp:(.text$_ZN3tbb10interface623task_scheduler_observerD1Ev[_ZN3tbb10interface623task_scheduler_observerD1Ev]+0x1c): undefined reference to
tbb::internal::task_scheduler_observer_v3::observe(bool)'C:\RBuildTools\4.3\x86_64-w64-mingw32.static.posix\bin/ld.exe: file14504c8a6ca0.o:file14504c8a6ca0.cpp:(.text$_ZN3tbb10interface623task_scheduler_observerD1Ev[_ZN3tbb10interface623task_scheduler_observerD1Ev]+0x37): undefined reference to `tbb::internal::task_scheduler_observer_v3::observe(bool)'C:\RBuildTools\4.3\x86_64-w64-mingw32.static.posix\bin/ld.exe: file14504c8a6ca0.o:file14504c8a6ca0.c
Error in sink(type = “output”) : invalid connection
##############################
Thanks,
Aruho