I am a master student of biostatistics and am currently working on my thesis. I have written a semi-parametric accelerate failure time model for censored recurrent event data. The statistical inference is based on a non-parametric Bayesian approach that uses a Dirichlet process prior for the mixing distribution. I do not know if the model that I wrote is correct or not and I can not get DIC. Also it takes much time to run, about 10 hours!
I would be grateful if someone could help me with this problem. Here is my model:
model sch;
const
n=633, N=25, p=6, b0=-10, B0=10, M=1, a0=0.1, A0=10;
var
x[n], alpha, lambda[n], cen[n], eta[N], latent[n], prob[N], mu[N], a[N];
{
for(i in 1:633){
x[i] ~ dweib(alpha,lambda[i]) I(cen[i],);
lambda[i]<-pow((beta[i]),alpha);
log(beta[i]) <- eta[latent[i]]+age[i]*b[1]+sex[i]*b[2]+mar[i]*b[3]+back1[i]*b[4]+back2[i]*b[5]+form[i]*b[6]+u[subject[i]];
latent[i]~dcat(prob[]);}
for(i in 1:159){
u[i]~dnorm(0,tau)
}
for (j in 1:6){
b[j]~dnorm(0,0.001)
}
tau~dgamma(0.0001,0.0001);
sigma2.subject<-1/tau;
prob[1:25]~ddirch(a[]);
for(k in 1:25){
eta[k]~dunif(-10,10);
mu[k]<-exp(-eta[k]/alpha);
a[k]<-1/25;}
alpha~dunif(0.1,10);
}