Operating System: Windows 11
Interface Version: cmdstanr 0.8
Compiler/Toolkit: rtools43
Hi,
I was trying to create stan model object as follows:
if(fitModel){
# create stan model object
file.copy(file.path(modelDir, paste0(modelName, ".stan")),
file.path(outDir, paste0(modelName, ".stan")), overwrite = TRUE)
mod <- cmdstan_model(file.path(outDir, paste0(modelName, ".stan")))
fit <- mod$sample(data = data, chains = nChains, init = init,
parallel_chains = nChains,
iter_warmup = nBurn, iter_sampling = nPost,
seed = sample(1:999999, 1), adapt_delta = 0.8,
refresh = 10,
output_dir = outDir)
fit$save_object(file.path(outDir, paste0(modelName, ".fit.RDS")))
}else{
fit <- readRDS(file.path(outDir, paste0(modelName, ".fit.RDS")))
}
And I got the following error:
Compiling Stan program...
Error in `process_initialize(self, private, command, args, stdin, stdout, …`:
! Native call to `processx_exec` failed
Caused by error in `chain_call(c_processx_exec, command, c(command, args), pty, pty_options, …`:
! Command 'bin/stanc.exe' not found @win/processx.c:982 (processx_exec)
Type .Last.error to see the more details.
I have read a lot of these sorts of struggles but none seem to be what I need. Advice is appreciated.