I am using Window system-10, 64bit, R- 4.0.2, RTools 40, rstan 2.19.3
I am trying to run the following model using ulam function (from the book Statistical rethinking):
m11.4<-ulam(
alist(
pulled_left ~dbinom(1,p),
logit§ <-a[actor]+b[treatment],
a[actor] ~dnorm(0,1.5),
b[treatment] ~dnorm(0,0.5)
),data=dat_list,chains=4,log_lik=TRUE)
I got the following error:
Error in file(con, “r”) : cannot open the connection
In addition: Warning messages:
1: In system(cmd, intern = !verbose) :
running command ‘C:/PROGRA~1/R/R-40~1.2/bin/x64/R CMD SHLIB file3e48ad46776.cpp 2> file3e48ad46776.cpp.err.txt’ had status 1
2: In file(con, “r”) :
cannot open file ‘file3e48ad46776.cpp.err.txt’: No such file or directory
Error in sink(type = “output”) : invalid connection
I tried several attempts using “RStan getting started page” and several posts similar to this (like editing Makevars.win file). However, I failed to address this. Any help appreciated.
Remove success. Got this error while installing package:
ERROR: compilation failed for package ‘StanHeaders’
removing ‘C:/Users/Shambhu Paudel/Documents/R/win-library/4.0/StanHeaders’
Warning message:
In install.packages(“https://cran.r-project.org/src/contrib/Archive/StanHeaders/StanHeaders_2.19.2.tar.gz”, :
installation of package ‘C:/Users/SHAMBH~1/AppData/Local/Temp/RtmpMrmafP/downloaded_packages/StanHeaders_2.19.2.tar.gz’ had non-zero exit status
No. But after removing what previous error says. I got this now:
*** arch - i386
C:/Rtools/mingw_32/bin/gcc -I"C:/PROGRA~1/R/R-40~1.2/include" -DNDEBUG -DNO_FPRINTF_OUTPUT -I"…/inst/include" -include stan_sundials_printf_override.hpp -O2 -Wall -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c cvodes/cvodes_nls_stg1.c -o cvodes/cvodes_nls_stg1.o
sh: C:/Rtools/mingw_32/bin/gcc: No such file or directory
make: *** [C:/PROGRA~1/R/R-40~1.2/etc/i386/Makeconf:222: cvodes/cvodes_nls_stg1.o] Error 127
ERROR: compilation failed for package ‘StanHeaders’
removing ‘C:/Users/Shambhu Paudel/Documents/R/win-library/4.0/StanHeaders’
Warning message:
In install.packages(“https://cran.r-project.org/src/contrib/Archive/StanHeaders/StanHeaders_2.19.2.tar.gz”, :
installation of package ‘C:/Users/SHAMBH~1/AppData/Local/Temp/RtmpMrmafP/downloaded_packages/StanHeaders_2.19.2.tar.gz’ had non-zero exit status
No man pages found in package ‘StanHeaders’
*** installing help indices
** building package indices
** installing vignettes
** testing if installed package can be loaded from temporary location
*** arch - i386
Error: package or namespace load failed for ‘StanHeaders’ in library.dynam(lib, package, package.lib):
DLL ‘StanHeaders’ not found: maybe not installed for this architecture?
Error: loading failed
Execution halted
*** arch - x64
ERROR: loading failed for ‘i386’
removing ‘C:/Users/Shambhu Paudel/Documents/R/win-library/3.6/StanHeaders’
Warning message:
In install.packages(“https://cran.r-project.org/src/contrib/Archive/StanHeaders/StanHeaders_2.19.2.tar.gz”, :
installation of package ‘C:/Users/SHAMBH~1/AppData/Local/Temp/RtmpuAOh40/downloaded_packages/StanHeaders_2.19.2.tar.gz’ had non-zero exit status