在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楼


雷达卡




京公网安备 11010802022788号







