WinBUGS
Posts  1 - 1  of  1
Bambey
Hello
I have written a code in WINBUGS to analyse censored data. The model i have written is synthetically correct (Weibull, I dont want to use the build in Weibull dist) and data loads very well but the results, kernel densities and the other graphs make me feel they is something wrong, DIC cannot be calculated. Can somebody suggest something? codes below

Thanks

Chris



model
{
for(i in 1:n){
f[i]<- theta*gamma*pow(t[i],gamma-1)*exp(-theta*pow(t[i],gamma))
S[i]<-exp(-theta*pow(t[i],gamma))
L[i]<-pow(f[i],xi[i])*pow(S[i],xi[i])
logL[i]<-log(L[i])
}

#prior
theta~dgamma(1,1)
gamma~dgamma(1,1)
}
list(theta=0.5,gamma=0.5)



list(n=30,t=c(17.7,18.39,19.21,19.38,20.49,20.76,21.02,22.86,23.39,23.82,24.21,24.21,24.31,24.28,24.97,25.23,25.33,25.56,25.59,25.76,25.79,25.79,26.05,27.89,28.22,28.59,28.65,29.08,29.31,30.26),xi=c(1,1,1,0,0,0,1,1,0,0,1,0,1,0,0,1,0,0,0,0,1,0,1,0,0,1,0,0,0,0))

Save
Cancel
Reply
 
x
OK