# 8.3 HOES meta-analyssi ## Monitor theta, phi, mu, tau, beta, break, theta.pred for # independent and exchangeable baselines # warning, occasional very high value of phi0 causes 'break' # to not give statistics model { for(i in 1:12){ rt[i]~dpois(mt[i]) rc[i]~dpois(mc[i]) log(mt[i]) <-log(nt[i]/1000) + phi[i] + theta[i] log(mc[i]) <-log(nc[i]/1000) + phi[i] theta[i] <- theta.adj[i] + beta*(phi[i]-mean(phi[1:12])) theta.adj[i] ~ dnorm(mu,tau2.inv) #phi[i] ~ dunif(-10,10) # independence prior 1 phi[i] ~ dnorm(mu.phi, tau2.phi.inv) log(rr[i])<- theta[i] log(rbase[i])<-phi[i] } mu ~ dunif(-10,10) tau2.inv <- 1/(tau*tau) tau ~ dunif(0,10) mu.phi ~ dunif(-10,10) tau2.phi.inv <- 1/(tau.phi*tau.phi) tau.phi ~ dunif(0,10) beta ~ dunif(-10,10) phi0 <- -mu/beta + mean(phi[1:12]) break<-exp(phi0) # predict theta for phi = -1,-.5,0,...., 3.5 for(j in 1:10){ theta.adj.pred[j] ~ dnorm(mu,tau2.inv) theta.pred[j] <- theta.adj.pred[j] + beta*( (j-3)/2 -mean(phi[1:12])) } }