You'll need to provide more information for anyone to help you. Are you working directly in WinBUGS or using a pass-through like R2WinBUGS? Could you elaborate on what specific error message is coming up in WinBUGS and post it here? Cheers.
thanks for your answer. I am working directly with it. when I generate inits, software output is "value of categorical Y[1,3] must be an integer". this is part of my model:
Glad you figured it out. Was it just a code typo? If you think it would be helpful to other WinBUGers please consider posting your solution to the problem. Cheers,
Just in case someone else comes across this, I had this same problem and the issue was with the initial values. Using the initial values R script provided by Kery and Schaub (https://www.amazon.com/Bayesian-Population-Analysis-using-WinBUGS/dp/0123870208), I got it to work fine.
Marc Kéry and Michael Schaub wrote a great book that I would recommend to anyone fitting models in a Bayesian framework. It is definitely worth the investment. They also have a companion website that provides all the R script (http://www.vogelwarte.ch/de/projekte/publikationen/bpa/). It is the "ms.init.z" function.