I am running this code which give me an error :Error of exponential t[3] must have positive value. However, when I change to a Weibull t[i] ~ dweib(1,mu[i])I(t.cen[i],) it is running without a hitch. How can I solve the problem. A Wei(1,p)=Exp(p). Exponential does not like NA
model;
{
for( i in 1 : N ) {
t[i] ~ dexp(mu[i])I(t.cen[i],)
}
for( i in 1 : N ) {
mu[i] <- exp(beta0 + beta1 * trt[i])
}
beta0 ~ dnorm( 0.0,1.0E-4)
beta1 ~ dnorm( 0.0,1.0E-4)
}
list(N=255)
t[] t.cen[] trt[]
1.57808 0.00000 1
1.48219 0.00000 1
NA 7.33425 0
2.23288 0.00000 0
NA 9.38356 1
3.27671 0.00000 0
NA 9.64384 0
1.66575 0.00000 1
END
list(beta0 =0, beta1 = 0)
list(beta0 = -2.5, beta1 = -2.5)
list(beta0 =2.5, beta1 = 2.5)