model {
for (i in 1:n) {
y[i] ~ dnorm(mu, inv.sigma.squared)
}
mu ~ dnorm(gamma, inv.omega.squared)
inv.omega.squared <- n0/sigma.squared
inv.sigma.squared <- 1/sigma.squared
y.pred ~ dnorm(mu, inv.sigma.squared)
P.crit <- step(y.pred - y.crit)
}
Data:
list(n=2, y=c(128, 132), gamma=120, n0=0.25,
sigma.squared=25, y.crit=145)
node mean sd MC error 2.5% median 97.5% start sample
P.crit 0.00363 0.06014 1.856E-4 0.0 0.0 0.0 1001 100000
mu 128.9 3.328 0.01017 122.3 128.9 135.4 1001 100000
y.pred 128.9 5.999 0.01936 117.1 128.9 140.6 1001 100000