mirror of
https://github.com/ION606/COGMOD-HWI.git
synced 2026-05-14 22:16:57 +00:00
finished HW3
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
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
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user