data {
      cadj <- 100000
      for(i in 1 : N ) {zeros[i] <- 0}
      }

model{

   for(i in 1 : N) {

      ### likelihood
      mu[i] <- exp(alpha + inprod(x[i, ], beta))
      l[i] <- r0 * pow(timev[i], r0-1) * mu[i] # hazard

      HL[i] <- mu[i] * pow(timev[i], r0) # cumulative hazard

      L[i] <- pow(l[i], event[i]) * exp(-HL[i]) #censor: event[i]==0 # Likelihood presented with Poisson

      phi[i] <-  -log (L[i]) + cadj

      zeros[i] ~ dpois( phi[i] )     # likelihood is exp(-phi[i])
      }


      ### prior
      for(j in 1 : (n_cov+1)){beta[j] ~ dnorm(0.0, .0001)}
      r0 ~ dexp(.0001)

	    alpha ~ dnorm(0, .0001)

      ### output

      HR_trt_cc=exp(beta[1])
      HR_cc_hc = 0
      }


