楼主: xiaofj
1505 1

winbugs编译出错“unable to choose updater for node taub2[1,1]” [推广有奖]

  • 0关注
  • 0粉丝

学前班

70%

还不是VIP/贵宾

-

威望
0
论坛币
8 个
通用积分
0
学术水平
0 点
热心指数
0 点
信用等级
0 点
经验
26 点
帖子
3
精华
0
在线时间
1 小时
注册时间
2017-10-12
最后登录
2019-1-16

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

求职就业群
赵安豆老师微信:zhaoandou666

经管之家联合CDA

送您一个全额奖学金名额~ !

感谢您参与论坛问题回答

经管之家送您两个论坛币!

+2 论坛币
我的源码如下,其中,taub[1:2 , 1:2]是一个协方差矩阵,它的逆taub2[1:2 , 1:2]服从Wishart分布。
model
{
for ( i in 1:I) {  
  for ( j in 1:NoVisits ) {
   IntTime[Start+j-1]~dexp(lambda[i,j])
   lambda[i,j]<- k[i,j]*(lambdaa[i,1]+lambdaa[i,2])+(1-k[i,j])*lambdaa[i,1]   
   k[i,j]~dbern(p)
  }
}
for ( i in 1:I) {
  p<-exp(pp)/(1+exp(pp))
  pp~dnorm(pm,pv)
  lambdaa[i,1] <-exp(lambdaalog[i,1] )
  lambdaa[i,2] <-exp(lambdaalog[i,2] )
  lambdaalog[i,1:2]~dmnorm(mub[],taub[1:2 , 1:2])
}
taub[1:2 , 1:2]<-inverse(taub2[1:2 , 1:2])
taub2[1:2 , 1:2] ~ dwish(R[ , ], 2)

pm~dnorm(-0.13, 0.001)
pv<-(1/pv2)
pv2~ dgamma(0.2, 0.1)
mub[1]~dnorm(0.04, 0.001)
mub[2]~dnorm(75, 0.001)
}
list(
NoVisits=c(4,5,9,13,14,34,12,12,7,26),
Start=c(1,5,10,19,32,46,80,92,104,111),
IntTime=c(101.18728,0.43793,78.98381,84.64679,11.86966,5.30372,3.77996,10.41298,322.28447,23.65847,51.94094,44.96256,0.3518,0.31278,47.1044,0.38145,51.76386,133.63374,3.2497,2.08358,1.3957,1.77537,2.34434,0.88446,2.40175,2.34836,1.03303,2.26494,0.54575,2.58738,305.48963,1.11025,1.39073,1.16223,1.6751,0.64492,20.73917,1.24143,86.11369,167.09158,0.60013,35.19377,0.7257,0.72089,12.53384,24.36262,0.41158,16.44356,0.30801,18.05034,19.37655,0.66023,0.17906,10.47063,0.88914,24.16075,14.46642,10.03867,12.32532,0.81004,13.77208,0.32718,0.53061,42.01017,10.791,0.48508,13.4481,21.60589,31.03709,21.53514,12.81948,9.7653,8.54452,9.6798,0.3886,13.55587,0.56849,0.43011,0.59748,1.77712,0.63402,1.02834,105.73851,2.3844,44.25245,1.12181,6.04204,90.65975,1.21531,0.24134,100.78663,0.54404,0.36588,1.15077,10.83418,0.48786,0.74062,0.56801,120.04232,1.6722,0.25873,132.82846,90.53738,0.83102,85.11902,0.46851,0.50872,0.75101,30.78906,202.11183,1.89977,1.61067,1.22062,0.52893,0.56786,1.83491,0.82244,1.19584,0.55438,2.006,2.35227,2.00613,1.33195,1.25278,1.26588,1.31076,0.99915,0.61415,0.48794,3.33559,1.19989,101.40746,1.42313,3.40521,0.88697,13.29708),
R = structure(.Data = c(1, 0, 0, 1), .Dim = c(2,2)),
I=10)

二维码

扫码加我 拉你入群

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

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


沙发
xiaofj 发表于 2017-10-12 11:37:44 |只看作者 |坛友微信交流群
请各位大神帮忙看看,现在已焦头烂额,谢谢各位了

使用道具

您需要登录后才可以回帖 登录 | 我要注册

本版微信群
加好友,备注jltj
拉您入交流群

京ICP备16021002-2号 京B2-20170662号 京公网安备 11010802022788号 论坛法律顾问:王进律师 知识产权保护声明   免责及隐私声明

GMT+8, 2024-11-5 14:47