I've gone back and forth on different model structures within the stan code, as Stan doesn't make it easy to fit models with different parameter sets form the same base .stan file. My original architecture had all the tail models within one stan model file. This was messy (lots of if/else statements), and it turns out that unsampled parameters can still influence the model running (I got some strange results using lax priors on un-sampled parameters). So I switched to the current approach, in which the binomial and multinomial models are split across 5 stan files, one for each tail model (set of parameters). This works well, but has the disadvantage of having to compile 10 files instead of 2, making installation slow.
Of course, installation speed isn't the most important thing, but would be nice it if was fast. There do seem to be some minor hacks to work around Stan's strictness w/r/t parameters. In particular, seems you can do a lot with specifying parameters in the transformed parameter block, instead of the main parameter block. See this post, https://www.martinmodrak.cz/2018/04/24/optional-parameters/data-in-stan/, and page 53 of the stan reference manual on promotion to parameters. It seems like these techniques could be reduced to bring things back to one model each for binomial vs. multinomial, but that seems like a minor issue.
I've gone back and forth on different model structures within the stan code, as Stan doesn't make it easy to fit models with different parameter sets form the same base .stan file. My original architecture had all the tail models within one stan model file. This was messy (lots of if/else statements), and it turns out that unsampled parameters can still influence the model running (I got some strange results using lax priors on un-sampled parameters). So I switched to the current approach, in which the binomial and multinomial models are split across 5 stan files, one for each tail model (set of parameters). This works well, but has the disadvantage of having to compile 10 files instead of 2, making installation slow.
Of course, installation speed isn't the most important thing, but would be nice it if was fast. There do seem to be some minor hacks to work around Stan's strictness w/r/t parameters. In particular, seems you can do a lot with specifying parameters in the transformed parameter block, instead of the main parameter block. See this post, https://www.martinmodrak.cz/2018/04/24/optional-parameters/data-in-stan/, and page 53 of the stan reference manual on promotion to parameters. It seems like these techniques could be reduced to bring things back to one model each for binomial vs. multinomial, but that seems like a minor issue.