generated from cotes2020/chirpy-starter
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Jachym.Barvinek
committed
Aug 4, 2024
1 parent
474e60e
commit e500ef5
Showing
1 changed file
with
16 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
data { | ||
int<lower=1> N; | ||
array[N] int<lower=0,upper=1> r, s, w; | ||
} | ||
parameters { | ||
real<lower=0,upper=1> pr; | ||
array[2] real<lower=0,upper=1> ps; | ||
array[2, 2] real<lower=0,upper=1> pw; | ||
} | ||
model { | ||
for (i in 1:N) { | ||
r[i] ~ bernoulli(pr); | ||
s[i] ~ bernoulli(ps[r[i]]); | ||
w[i] ~ bernoulli(pw[r[i], s[i]]); | ||
} | ||
} |