model{ for(i in 1:N1){ K[i,1:2]~dmnorm(mu,prec) } # Construct the covariance matrix prec<-inverse(cov) cov[1,1]<-sigma[1]^2 cov[2,2]<-sigma[2]^2 cov[1,2]<-sigma[1]*sigma[2]*rho cov[2,1]<-sigma[1]*sigma[2]*rho # Priors for(j in 1:N2){ mu[j]~dnorm(0,1/10000) sigma[j]~dunif(0.001,1000) } rho~dunif(-1,1) }