I am setting up some sort of simulation study here, and it would be very convenient to be able to specify an ‘if x, declare parameter y’ type statement. The alternative seems to be to code the if statements in R, which will require re-compiling for every condition, or to sample parameters that are pointless under some conditions. Any alternative approaches would be very welcome!

As Bob notes in the the GitHub issue a simplex of size zero doesn’t make any sense as it can’t satisfy the sum-to-one constraint so it is unlikely that we will support that in the near future. All of the other containers, however, should support size 0.

Summary:
This is the issue for suggesting fixes for the Stan manual. Please just add suggestions as comments rather than opening new...

documentation

It’s possible at least in theory to support these conditionals but it would have to be with the condition that only data could be involved in the conditionals—otherwise, the number of variables could vary iteration to iteration, which we can’t allow.