Syntax errors for a user defined function

Cmdstan should also be on 2.26, so it should work.

The code looks good at first glance, so maybe it is just older version of rstan not recognizing sort_desc. However, it looks like you throw away some values for cvxy that you compute in the loop - i.e. cvxy[lx + 2] and above is never used, so if you don’t use it you may as well not compute it all and save some performance.

1 Like