model{ for(i in 1:N1){ K[i,1:2]~dmnorm(mu,precI) } precI<-inverse(prec) prec[1,1]<-sigma[1]^2 prec[2,2]<-sigma[2]^2 prec[1,2]<-rho*sigma[1]*sigma[2] prec[2,1]<-rho*sigma[1]*sigma[2] # Priors for(j in 1:N2){ mu[j]~dnorm(0,0.0001) lambda[j]~dgamma(0.001,0.001) sigma[j]<-pow(lambda[j],-0.5) } rho~dunif(-1,1) }