全部版块 我的主页
论坛 计量经济学与统计论坛 五区 计量经济学与统计软件 winbugs及其他软件专版
962 0
2019-08-29
《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)

二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

相关推荐
栏目导航
热门文章
推荐文章

说点什么

分享

扫码加好友,拉您进群
各岗位、行业、专业交流群