#Bayesian analysis using Pocock's method with piecewise constant baseline hazard model { ## Likelihoods ## for (i in 1:N) { # define the likelihood mu[i] <- TimeIntervals[i]*exp(alpha[Interval[i]]+inprod(par[],X[i,])+delta[Trial[i]]) EventsIntervals[i] ~ dpois(mu[i]); } #Variance and precision of study-specific biases sigmastudy2 <- sigmastudy*sigmastudy tau<- 1/sigmastudy2 #Delta's (trial specific biases) are normally distributed. Here we set the population mean of the theta's to zero, #because the alpha's already describe the baseline hazard. for (i in minTrial:(maxTrial-1)){ delta[i] ~ dnorm(0, tau) } #No bias for current data delta[maxTrial]<- 0 #Correlated Priors on Log-Hazards for (j in 1:P){ par[j] ~ dnorm(0,0.0001); } alpha[1] ~ dnorm(0,0.0001); for (k in 2:K) { alpha[k] ~ dnorm(alpha[k-1], eta); } eta <- 1/(sigma*sigma); sigma ~ dunif(0.01,100); }