| 所在主题: | |
| 文件名: 操作过程问题.doc | |
| 资料下载链接地址: https://bbs.pinggu.org/a-1116423.html | |
| 附件大小: | |
|
{:soso_e100:}在winbugs中运行sv-n模型时,
程序如下,在数据导入之后,按compile按钮时,显示array index is grater than array upper boundy for y ,如果数据减少至20程序就可以运行,请高手指点!万分感谢{:soso_e100:} model{ ### likelihood: joint distribution of y for(i in 1:n) {p[i]<-1/exp(theta[i]) y[i]~dnorm(0,p[i]) } ### prior distributions* phi1~dbeta(20,1.5) phi<-2*phi1-1 mu~dnorm(0,0.01) itau2~dgamma(2.5,0.025) tau<-sqrt(1/itau2) theta0~dnorm(mu,itau2) thmean[1]<-mu+phi*(theta0-mu) theta[1]~dnorm(thmean[1],itau2) for(j in 2:n) {thmean[j]<-mu+phi*(theta[j-1]-mu) theta[j]~dnorm(thmean[j],itau2) } } # DATA list(n=76,y=c(-0.2352, -3.7769, -3.5341, -1.8623, 4.3202, 2.8627, 0.9487, 1.1008, -1.7228, 0.4690, -0.9836, -1.7980, 0.1213, -0.8333, 0.0567, -0.3118, -1.7170, -1.8562, -8.6653, 0.1957, -1.3342, 3.1475, -1.6588, -0.5408, 2.7101, 2.3157, -2.4390, 0.1674, -4.3934, -0.5687, 0.9867, -0.8954, -1.4493, 3.3308, -0.8124, -1.8262, -0.3651, 1.5883, -1.3877, 2.5499, 0.2302, 4.4972, -3.1278, -2.4211, -0.6497, -0.5901, -1.5454, 0.9628, -2.5905, -0.8705, 0.1471, -1.2321, 0.5959, -0.0432, 2.2637, -0.5950, -2.1195, -0.5927, -0.3382, 0.2680, 0.7632, -1.3312, -0.1155, 2.1279, -1.0219, -0.8355, -0.9967, 0.3234, 0.1993, 0.2141, 0.0376, 1.4259, -1.6190, -0.0172, 1.6469, 3.0316)) Initial value list(phi1=0.975, mu=0, itau2=50) |
|
熟悉论坛请点击新手指南
|
|
| 下载说明 | |
|
1、论坛支持迅雷和网际快车等p2p多线程软件下载,请在上面选择下载通道单击右健下载即可。 2、论坛会定期自动批量更新下载地址,所以请不要浪费时间盗链论坛资源,盗链地址会很快失效。 3、本站为非盈利性质的学术交流网站,鼓励和保护原创作品,拒绝未经版权人许可的上传行为。本站如接到版权人发出的合格侵权通知,将积极的采取必要措施;同时,本站也将在技术手段和能力范围内,履行版权保护的注意义务。 (如有侵权,欢迎举报) |
|
京ICP备16021002号-2 京B2-20170662号
京公网安备 11010802022788号
论坛法律顾问:王进律师
知识产权保护声明
免责及隐私声明