This is cmdstanr version 0.0.0.9000 - Online documentation and vignettes at mc-stan.org/cmdstanr - CmdStan path set to: /home/saumyap/.cmdstanr/cmdstan - Use set_cmdstan_path() to change the path Compiling Stan program... Semantic error in '/tmp/RtmpIf4BQ8/model-ede05452448.stan', line 27, column 12 to line 28, column 45: ------------------------------------------------- 25: beta[2] ~ normal(0, 1); 26: 27: target += reduce_sum(partial_sum, n_redcards, grainsize, ^ 28: n_games, rating, beta); 29: } ------------------------------------------------- A returning function was expected but an undeclared identifier 'reduce_sum' was supplied. make: *** No rule to make target '/tmp/RtmpIf4BQ8/model-ede05452448.hpp', needed by '/tmp/RtmpIf4BQ8/model-ede05452448'. Stop. Error: System command 'make' failed, exit status: 2, stderr: E> E> Semantic error in '/tmp/RtmpIf4BQ8/model-ede05452448.stan', line 27, column 12 to line 28, column 45: E> ------------------------------------------------- E> 25: beta[2] ~ normal(0, 1); E> 26: E> 27: target += reduce_sum(partial_sum, n_redcards, grainsize, E> ^ E> 28: n_games, rating, beta); E> 29: } E> ------------------------------------------------- E> E> A returning function was expected but an undeclared identifier 'reduce_sum' was supplied. E> E> make: *** No rule to make target '/tmp/RtmpIf4BQ8/model-ede05452448.hpp', needed by '/tmp/RtmpIf4BQ8/model-ede05452448'. Stop. Stack trace: 1. cmdstanr:::cmdstan_model("logistic1.stan", threads = TRUE) 2. CmdStanModel$new(stan_file = stan_file, compile = compile, ...) 3. .subset2(public_bind_env, "initialize")(...) 4. self$compile(...) 5. processx::run(command = make_cmd(), args = c(tmp_exe, include_paths, ... 6. throw(new_process_error(res, call = sys.call(), echo = echo, ... x System command 'make' failed, exit status: 2, stderr: E> E> Semantic error in '/tmp/RtmpIf4BQ8/model-ede05452448.stan', line 27, column 12 to line 28, column 45: E> ------------------------------------------------- E> 25: beta[2] ~ normal(0, 1); E> 26: E> 27: target += reduce_sum(partial_sum, n_redcards, grainsize, E> ^ E> 28: n_games, rating, beta); E> 29: } E> ------------------------------------------------- E> E> A returning function was expected but an undeclared identifier 'reduce_sum' was supplied. E> E> make: *** No rule to make target '/tmp/RtmpIf4BQ8/model-ede05452448.hpp', needed by '/tmp/RtmpIf4BQ8/model-ede05452448'. Stop. Execution halted