Windows 10. I have installed cmdstan itself to C:\cmdstan2-26.1 manually and added the necessary Rtools paths to Windows’ Path variable. In Command Prompt, I am already able to run the bernoulli example successfully.
But I cannot use cmdstanr with brms to fit models with cmdstan functionality in R. Either cmdstan or cmdstanr is looking for things in the wrong directory:
require(brms)
require(cmdstanr)
testmod <- brm(y ~ (1|groups) + (1|subjects) + x1 + x2, prior = mypriors, family = categorical, data = mydata, decomp = "QR", backend = "cmdstanr")
and I get:
Compiling Stan program…
C:\Users\Folio:1: *** target pattern contains no ‘%’. Stop.
Error: An error occured during compilation! See the message above for more information.
Also, when I issue a diagnostic command seen in some other threads, the following error occurs:
cat(readLines(file.path(cmdstan_default_install_path(), "cmdstan-2.24.0", "stan","lib","stan_math","lib","boost_1.72.0","bootstrap.log")), sep = "\n")
Error in file(con, “r”) : cannot open the connection
In addition: Warning message:
In file(con, “r”) :
cannot open file ‘C:\Users\Folio 1040\Documents/.cmdstanr/cmdstan-2.24.0/stan/lib/stan_math/lib/boost_1.72.0/bootstrap.log’: No such file or directory
Note that the path that it’s trying to access is completely invalid: backslashes change into forward slashes mid-string. Also, I’m aware that having a space in the username is not great – however, that username was created by the person who sold me this laptop, so I have no control over it.