data { int N; array[N] real y; array[N] int condition; array[N] int choice; } parameters { // Your code here } model { // Priors // Your code here // Likelihood for (n in 1:N) { // Condition 1 if (condition[n] == 1) { if (choice[n] == 1) { // Your code here } else { // Your code here } } // Condition 2 if (condition[n] == 2) { if (choice[n] == 1) { // Your code here } else { // Your code here } } } }