I'm trying to fit a bivariate mixture of normals with measurement error in

both X and Y and model the true values. I'm trying to fit something like below

(some parts omitted):

for (i in 1:n){ x_obs[i] ~ dnorm(x_true[i],prec_x)I(x_true[i],) y_obs[i] ~ dnorm(y_true[i],prec_y) cbind(x_true[i],y_true[i])~dmnorm(mu[ z [ i ],1:2], tau[z[i],1:2,1:2]) z[i]~dcat(prob[ ]) } #priors for measurement error e_x~dunif(.1,.9) prec_x<-1/pow(e_x,2) e_y~dunif(2,4) prec_y<-1/pow(e_y,2)

Obviously the cbind command does not work. Any idea how I can modify it?

Thanks so much.