《Hierarchical Bayesian approaches to phase II trials in diseases with multiple subtypes》文献自带的winbugs code,运行总是出现错误“value of order of binomial x[1] must be greater than zero”,想求好心人解答怎么解决,也想知道其中初始值是根据什么设定的,具体代码如下:model
{
for (i in 1:numGroups)
{
# numGroups is k, the number of di?erent probabilities
x[i] ~dbin(p[i],n[i])
# In each group, x is the number of responses and n is the number of patients
logit(p[i]) <-rho[i]
rho[i]~dnorm(mu,tau)
pg[i]<-step(p[i]-targetResp)
# Probability that the response rate for each group is ¿ than targetResp,which is fixed response probability|D*
}
#Priors
mu~dnorm(mean.Mu, perc.Mu)
tau~dgamma(tau.alpha, tau.beta)
}
# Example data
list(x=c(0,0,1,3,5,0,1,2,0,0), n=c(0,2,1,7,5,0,2,3,1,0), numGroups=10,targetResp=0.30
mean.Mu=-1.3863, perc.Mu=.10, tau.alpha=2, tau.beta=20)
# Example of initial values
list(mu=1, tau=.10)


雷达卡


京公网安备 11010802022788号







