Hello:

I am having a problem fitting a Weibull model with right-censored data. I use

dinterval in the BUGS code, but when I run the (simple) program on simulated

data (where I know the true coefficients), the results are not even close.

When I code the log likelihood myself and use the 'Poisson trick' described in

Ntzoufras' text (page 276) everything works fine.

I am not sure of the reliability of the dinterval distribution. Perhaps I am

not using it correctly, but the documentation for its use is sparse.

Here is my code that works, followed by my original code with dinterval which

does not work:

model

{C<-100

for(i in 1:N){

zeros_~dpois(zeros.mean_)

zeros.mean_<- -l_+C

l_<-y.cens_*(log(beta/lambda_)+(beta-1)*log(y_/lambda_)-(y_/lambda_)^beta)+(1-

y.cens_)*(-(y_/lambda_)^beta)

log(lambda_)<-alpha0+alpha1/temp_

}

beta~dgamma(0.1,0.1)

alpha0~dnorm(0,0.01)

alpha1~dnorm(0,0.000001)

}

Original code:

model

{for(i in 1:N){

is.censored~dinterval(y_,y.cens_)

y_~dweib(beta,lambda_)

log(eta_)<- alpha0+alpha1/temp_

lambda_<-pow(eta_,-beta)

}

beta~dgamma(0.1,0.1)

alpha0~dnorm(0.0,0.01)

alpha1~dnorm(0.0,0.000001)

}

Any suggestions would be appreciated.*_**_*** _**___