Dear BUGS users, I tried to fit a mixed treatment comparisons model together with a meta-regression model. I have to compare 10 treatments, I dispose of 16 trials and I'd like to adjust for a variable representing the percentage of patients with severe disease in each arm (e). I tried the following programm (the core programm is based on the one given on the hsrc website : full random effect model) : model { for (i in 1:ns) { w[i,1] <- 0 delta[i,t[i,1]] <- 0 mu[i] ~ dnorm(0,.0001) for (k in 1:na[i]) { r[i,t[i,k]] ~ dbin(p[i,t[i,k]],n[i,t[i,k]]) logit(p[i,t[i,k]]) <- mu[i] + delta[i,t[i,k]] + beta*(e[i,t[i,k]] - mean(e[,t[,k]])) } for (k in 2:na[i]) { delta[i,t[i,k]] ~ dnorm(md[i,t[i,k]],taud[i,t[i,k]]) md[i,t[i,k]] <- d[t[i,k]] - d[t[i,1]] + sw[i,k] taud[i,t[i,k]] <- tau *2*(k-1)/k w[i,k] <- (delta[i,t[i,k]] - d[t[i,k]] + d[t[i,1]]) sw[i,k] <- sum(w[i,1:k-1])/(k-1) } } d[1] <- 0 for (k in 2:nt) { d[k] ~ dnorm(0,.0001) } beta ~ dnorm(0.0,1.0E-6) sd ~ dunif(0,2) tau <- 1/pow(sd,2) for (i in 1:ns) { mu1[i] <- mu[i]*equals(t[i,1],1) } for (k in 1:nt) { logit(T[k]) <- sum(mu1[])/7 + d[k] } for (c in 1:(nt-1)) { for (k in (c+1):nt) { or[c,k] <- exp(d[k] - d[c]) } } } data are under the form : list(nt=10,ns=16) r[,1] n[,1] e[,1] r[,2] n[,2] e[,2] .... t[,1] t[,2] t[,3] na[] the model doesn't compile and I don't know how to interprete the errors Any help would be very appreciated Thanks Stéphanie ------------------------------------------------------------------- This list is for discussion of modelling issues and the BUGS software. For help with crashes and error messages, first mail [log in to unmask] To mail the BUGS list, mail to [log in to unmask] Before mailing, please check the archive at www.jiscmail.ac.uk/lists/bugs.html Please do not mail attachments to the list. To leave the BUGS list, send LEAVE BUGS to [log in to unmask] If this fails, mail [log in to unmask], NOT the whole list