全部版块 我的主页
论坛 数据科学与人工智能 数据分析与数据科学 R语言论坛
3477 5
2015-03-16
在R中运行了:
bugs.sim<-bugs(data,inits=NULL,parameters,noyear,n.chains=1,n.iter=40000,n.burnin=1000,bugs.directory="D:/winbugs14/WinBUGS14/",working.directory="C:/BUGS",debug=TRUE)
之后,在winbugs的Log中得到如下信息:
display(log)
check(C:/BUGS/noyear.bug.txt)
model is syntactically correct
data(C:/BUGS/data.txt)
undefined variable
compile(1)
gen.inits()
command #Bugs:gen.inits cannot be executed (is greyed out)
thin.updater(39)
update(26)
command #Bugs:update cannot be executed (is greyed out)
set(beta)
command #Bugs:set cannot be executed (is greyed out)
set(p1)
command #Bugs:set cannot be executed (is greyed out)
set(p2)
command #Bugs:set cannot be executed (is greyed out)
set(p3)
command #Bugs:set cannot be executed (is greyed out)
set(deviance)
command #Bugs:set cannot be executed (is greyed out)
dic.set()
command #Bugs:dic.set cannot be executed (is greyed out)
update(1000)
command #Bugs:update cannot be executed (is greyed out)
coda(*,C:/BUGS/coda)
command #Bugs:coda cannot be executed (is greyed out)
stats(*)
command #Bugs:stats cannot be executed (is greyed out)
dic.stats()

DIC
history(*,C:/BUGS/history.odc)
command #Bugs:history cannot be executed (is greyed out)
save(C:/BUGS/log.odc)
save(C:/BUGS/log.txt)


请问是哪里出了问题,是给的原始数据的问题吗。。?但是检查了好几遍,实在是不知道问题在哪里了。。请各位仁兄帮忙!十分感谢!!

代码在2楼
二维码

扫码加我 拉你入群

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

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

全部回复
2015-3-16 15:29:23
为方便解答,给出代码:
复制代码


数据则是用csv格式做的,有多个文档,已经转换成vector;
data<-list("event","light","prep","temp.cum","N.sites","response.day","n.beta","N.days")
parameters<-c("beta","p1","p2","p3")
inits<-function(){list()}

已经读了论坛里大量的关于winbugs的帖子,仍然想不通问题在哪里。。真心求助!
二维码

扫码加我 拉你入群

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

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

2015-3-16 15:33:07
不知道能不能艾特出大神。。。好吧发现不能艾特。。算了。。
二维码

扫码加我 拉你入群

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

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

2015-3-16 20:15:06
自己解决了该问题。。确实是原始数据的问题
二维码

扫码加我 拉你入群

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

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

2017-12-5 20:53:51
空sutra 发表于 2015-3-16 20:15
自己解决了该问题。。确实是原始数据的问题
你好!我现在也遇到这样的问题了,请问您说的原始数据问题是什么意思呢?格式还是什么,如果是格式需要什么格式呢
二维码

扫码加我 拉你入群

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

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

2021-9-29 11:03:52
撒哈拉lu 发表于 2017-12-5 20:53
你好!我现在也遇到这样的问题了,请问您说的原始数据问题是什么意思呢?格式还是什么,如果是格式需要什 ...
同问啊,请问是什么问题呢
二维码

扫码加我 拉你入群

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

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

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

说点什么

分享

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