I am doing bayesian analysis in which my outcome variable is binary (perinatal mortality). I have a couple of explanatory variables such as gender, birth order, maternal education, residence, maternal weight, birth interval etc. I am new in bayesian analysis but I have invested a lot in learning it. now I am trying to reproduce one example which exactly looks similar to my model using rjags. Unfortunately I am getting this error "Error parsing model file: syntax error on line 20 near ""

Can anyone help me where do I go wrong. These are my codes:

logistic_model <- "model{

   # Likelihood

   for(i in 1:n){
    Y[i] ~ dbern(q[i])
    logit(q[i]) <- beta[1] + beta[2]*X[i,1] + beta[3]*X[i,2] + 
                   beta[4]*X[i,3] + beta[5]*X[i,4] + beta[6]*X[i,5]+

   for(j in 1:13){
    beta[j] ~ dbeta(2,2)


model<-jags.model(textConnection(logistic_model),data = dat,n.chains = 3,quiet = TRUE)

Browse other questions tagged or ask your own question.