Translating winBUGS code to Stan

Thank you for your response! I ran the program again, this time the warning did not appeared. It must have been the warning from a slightly different Stan program as you suggested. Thanks for catching that.

Now initialisation fails when I run the program with simulated data. (This has happened previously, but I thought it was a result of the previous warning message regarding the Jacobian adjustment. See Exception: bernoulli_logit_lpmf: Logit transformed probability parameter is nan, but must not be nan!):

Chain 1: Rejecting initial value:
Chain 1: Error evaluating the log probability at the initial value.
Chain 1: Exception: bernoulli_logit_lpmf: Logit transformed probability parameter is nan, but must be not nan! (in ‘model4ab459f32f4_cpt_2’ at line 101)

Any ideas what the problem might be? Thanks again!