Dear WinBUGS users, I am working on a mixture model using the dirichlet distribution. I am trying to generate initial values for all T[i]'s that have to be integers but WinBUGS repeatedly fails to do so. Is there anything I can do to solve this permanently? Please see below the code. model { for( i in 1 : N ) { R[i] ~ dnorm(S[i], tau) S[i] <- lambda[T[i]] T[i] ~ dcat(P[]) } P[1:2] ~ ddirch(alpha[]) lambda[2] ~ dnorm(0.0, 1.0E-6) lambda[1] ~ dnorm(0.0, 1.0E-6) tau ~ dgamma(0.001, 0.001) sigma <- 1 / sqrt(tau) } Many thanks, Polychronis P. Kostoulas D.V.M., PhD student of Veterinary Epidemiology _____________________________________________________________________________ Laboratory of Epidemiology, Biostatistics and Economics of Animal Production School of Veterinary Medicine University of Thessaly Karditsa, 224 Trikalon st. GREECE. P.C. 43100 Telephone: +30 2441066092 Fax: +30 2441066041 Email: [log in to unmask] ------------------------------------------------------------------- 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