搜索
人大经济论坛 附件下载

附件下载

所在主题:
文件名:  random effects model for binary data.rar
资料下载链接地址: https://bbs.pinggu.org/a-1771302.html
本附件包括:
  • random effects model for binary data.R
附件大小:
我最近做二分类变量的网络meta分析 到最后一步总是WinBUGS报错,报错结果以及我的运行代码(附件是我的数据[[url=]netmeta.rar[/url]以及用的模型[url=]random effects model for binar ...[/url]如下,恳请知道的人解答一下,不胜感激。
display(log)
check(D:/rwork/random effects model for binary data.R.txt)
model is syntactically correct
data(D:/rwork/data.txt)
data loaded
compile(1)
made use of undefined node n
inits(1,D:/rwork/inits1.txt)
command #Bugs:inits cannot be executed (is greyed out)
gen.inits()
command #Bugs:gen.inits cannot be executed (is greyed out)
thin.updater(30)
update(334)
command #Bugs:update cannot be executed (is greyed out)
set(lor)
command #Bugs:set cannot be executed (is greyed out)
set(or)
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(*,D:/rwork/coda)
command #Bugs:coda cannot be executed (is greyed out)
stats(*)
command #Bugs:stats cannot be executed (is greyed out)
dic.stats()

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



这是我的全部程序代码
library(boot)
library(coda)
library(lattice)
library(foreign)
library(R2WinBUGS)
bugsname <- file.path("D:/rwork","random effects model for binary data.R")
mymeta<-read.csv("C:/Users/wtw/Desktop/netmeta.csv")
mymeta
t<-array(,dim=c(69,3))
r<-array(,dim=c(69,3))
n<-array(,dim=c(69,3))
t[,1]<-mymeta$t..1.
r[,1]<-mymeta$r..1.
n[,1]<-mymeta$n..1.
t[,2]<-mymeta$t..2.
r[,2]<-mymeta$r..2.
n[,2]<-mymeta$n..2.
t[,3]<-mymeta$t..3.
r[,3]<-mymeta$r..3.
n[,3]<-mymeta$n..3.
na<-mymeta$na..
ns<-69
nt<-10
data<-list("t","r","n","na","ns","nt")
data
inits<-function()
{
list(d=c(NA,0,0,0,0,0,0,0,0,0,0,0,0,0),sd=1,
mu=c(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0))
}
parameters <- c("lor", "or")
metaresult<-bugs(data,inits,parameters,bugsname,n.chains=1,n.iter=40000,
n.burnin=10000,bugs.directory="D:/Program Files/WinBUGS14/",working.directory="D:/rwork",debug=T)



    熟悉论坛请点击新手指南
下载说明
1、论坛支持迅雷和网际快车等p2p多线程软件下载,请在上面选择下载通道单击右健下载即可。
2、论坛会定期自动批量更新下载地址,所以请不要浪费时间盗链论坛资源,盗链地址会很快失效。
3、本站为非盈利性质的学术交流网站,鼓励和保护原创作品,拒绝未经版权人许可的上传行为。本站如接到版权人发出的合格侵权通知,将积极的采取必要措施;同时,本站也将在技术手段和能力范围内,履行版权保护的注意义务。
(如有侵权,欢迎举报)
二维码

扫码加我 拉你入群

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

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

GMT+8, 2025-12-30 06:47