model {
theta ~ dbeta(a, b)
y ~ dbin(theta, n)
Y.pred ~ dbin(theta, n.pred)
P.crit <- step(Y.pred - n.crit + 0.5)
}
Data:
list(a=3, b=27, y=0, n=10, n.pred=20, n.crit=2)
node mean sd MC error 2.5% median 97.5% start sample
P.crit 0.4175 0.4931 0.001496 0.0 0.0 1.0 1 100000
Y.pred 1.499 1.427 0.004347 0.0 1.0 5.0 1 100000
theta 0.07514 0.04134 1.322E-4 0.01611 0.06794 0.1739 1 100000
![]() |
![]() |
![]() |