Example 6.3 Predictive distribution of Power model { tau.s <- 1/pow(.3,2) # transform sd to precision=1/sd2 tau.d <- 1/pow(.1,2) s ~ dnorm(1, tau.s)I(0,) d ~ dnorm(.5, tau.d)I(0,) n<- 2 * pow( (.84 +1.96) * s / d , 2 ) power <- phi( sqrt(63/2)* d /s -1.96 ) prob70 <-step(power-.7) }