Hello, I’m a university student taking a Bayesian Statistics module. As part of the coursework I’m required to use RStan.
I followed the instructions on https://mc-stan.org/ and installed RTools4. I then installed rstan and stan headers from source using the command,
install.packages(c(“StanHeaders”,“rstan”),type=“source”)
When I try and fit a model I get the following error,
olsStan ← stan(“OLS.stan”, data=simpleStanData, chains = 2, iter = 2000)
Error in file(fname, “rt”) : cannot open the connection
In addition: Warning messages:
1: In normalizePath(path.expand(path), winslash, mustWork) :
path[1]=“OLS.stan”: The system cannot find the file specified
2: In file(fname, “rt”) :
cannot open file ‘C:\Users\ollie\OneDrive\Documents\OLS.stan’: No such file or directory
Error in get_model_strcode(file, model_code) :
cannot open model file “C:\Users\ollie\OneDrive\Documents\OLS.stan”
Does anyone have any suggestions on ways to solve this :)