mirror of
https://github.com/ION606/COGMOD-HWI.git
synced 2026-05-14 22:16:57 +00:00
37 lines
747 B
Plaintext
37 lines
747 B
Plaintext
data {
|
|
int<lower=1> N;
|
|
array[N] real<lower=0> y;
|
|
array[N] int<lower=1, upper=2> condition;
|
|
array[N] int<lower=0, upper=1> 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
|
|
}
|
|
}
|
|
}
|
|
} |