Ha, the bug is actually on that line, just not what you’d suggested–
instead of
response ~ beta(response_mu*response_v[j], (1-response_mu)*response_v[j]);
it should be
response[j] ~ beta(response_mu*response_v[j], (1-response_mu)*response_v[j]);
I feel like this should be an error, or at least give a warning. I’ll open an issue on github for it.
Thanks Daniel and Arya for the suggestions.