HI - I’m new to Stan and working through a course on Bayesian modelling.
When I run this code;
library(rethinking)
data(Wines2012)
d <- Wines2012
dat_list <- list(S = standardize(d$score),
jid = as.integer(d$judge),
wid = as.integer(d$wine))
m1 <- ulam(alist(
S ~ dnorm( mu , sigma ),
mu <- a[jid] + w[wid],
a[jid] ~ dnorm(0,0.5),
w[wid] ~ dnorm(0,0.5),
sigma ~ dexp(1)), data=dat_list , chains=4 , cores=4)
I get this issue;
The NEXT version of Stan will not be able to pre-process your Stan program.
Please open an issue at
if you can share or at least describe your Stan program. This will help ensure that Stan
continues to work on your Stan programs in the future. Thank you!
This message can be avoided by wrapping your function call inside suppressMessages().
Error in file(con, “r”) : cannot open the connection
In addition: Warning messages:
1: In file.remove(c(unprocessed, processed)) :
cannot remove file ‘C:\Users\BEN10
2: In system(cmd, intern = !verbose) :
running command ‘C:/PROGRA
3: In file(con, “r”) :
cannot open file ‘file2150102d7cbc.cpp.err.txt’: No such file or directory
Error in sink(type = “output”) : invalid connection
I’m running R Studio
Version 1.3.959
© 2009-2020 RStudio, PBC
“Middlemist Red” (3a09be39, 2020-05-18) for Windows
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) QtWebEngine/5.12.6 Chrome/69.0.3497.128 Safari/537.36
Stan version 2.21.0
UPDATE: I updated RStan to 2.21.2 latest version but it still generates an error…
Error in file(con, “r”) : cannot open the connection
In addition: Warning messages:
1: In system(paste(CXX, ARGS), ignore.stdout = TRUE, ignore.stderr = TRUE) :
‘C:/rtools40/usr/mingw_/bin/g++’ not found
2: In system(cmd, intern = !verbose) :
running command ‘C:/PROGRA1/R/R-401.2/bin/x64/R CMD SHLIB file550c6614374a.cpp 2> file550c6614374a.cpp.err.txt’ had status 1
3: In file(con, “r”) :
cannot open file ‘file550c6614374a.cpp.err.txt’: No such file or directory
Error in sink(type = “output”) : invalid connection