In the function block of my code I have the following line.
if (sigma<=0)
reject("sigma<=0; found sigma =", sigma)
This code worked in an older version of RStan from around 4/2020. Now I’m running a newer version (along with a newer version of R), which offers the following error:
Syntax error in 'string', line 8, column 4 to column 6, parsing error:
Ill-formed reject statement. After "reject(", we expect a comma separated list of either expressions or strings, followed by ");".
I was able to get the script to execute with the semi-colon
if (sigma<=0)
reject("sigma<=0; found sigma =", sigma);
The strange thing is, now I’m getting different results in my model. I’m also getting some errors from the compiler:
Warning message:
In system(paste(CXX, ARGS), ignore.stdout = TRUE, ignore.stderr = TRUE) :
'-E' not found
The full script is attached if you want to take a gander.
multi-level.stan (1.4 KB)