采用Meta包metabin命令報錯解決

fit<-metabin(dat$e.e,dat$e.tot,dat$c.e,dat$c.tot, data=dat,

? ? ? ? ? ? ? sm="RR", method="MH", comb.fixed=T,

? ? ? ? ? ? ? comb.random=F,studlab=dat$lab)

Error in (function (yi, vi, sei, weights, ai, bi, ci, di, n1i, n2i, x1i, :

? Fisher scoring algorithm did not converge. See 'help(rma)' for possible remedies.

數(shù)據(jù)無法估計,有兩種方法解決

第一種:采用stata軟件 重新估計,不會報錯

第二種:換用metafor的rma包,但是rma包繪制的森林圖不如meta包繪制的精美,需要手手動調(diào)整,同時,若估計固定效應(yīng),rma.mh估計結(jié)果與stata一致

dt.1<-rma.mh(measure="RR", ai=e.e, bi=e.tot-e.e,

? ? ? ? ? ci=c.e, di=c.tot-c.e,n1i=e.tot,n2i = c.tot,

? ? ? ? ? data=dat, method="FE",? #固定效應(yīng)

? ? ? ? ? slab = dat$lab

? ? ? ? ? )

森林圖繪制

forest(dt.1,

? ? ? atransf=exp, #轉(zhuǎn)換成RR

? ? ? slab=dat$lab,

? ? ? ilab.xpos = c(-1.1,-0.8,-0.5,-0.2),? #位置參數(shù)

? ? ? ilab = cbind(e.e,e.tot,c.e,c.tot),? #event total controlevent control total

? ? ? showweights=T,

? ? ? header = F,

? ? ? xlab = "",

? ? ? mlab = "Fixed-effect Model for All Studies",

? ? ? psize = 1

? ? )

text(c(-1.6,-1.1,-0.8,-0.5,-0.2,1.5,2), #X位置

? ? dt.1$k+2,? ? ? ? ? ? ? ? #Y軸位置

? ? c("Study", "Events", "Total", "Events", "Total",

? ? ? "Weight","RR 95%-CI"),

? ? cex=1.2,font = 2)

text(c(-0.9,-0.4),? ?

? ? dt.1$k+3,

? ? c("Experimental", "Control"),? ?

? ? cex=1.2, font=2)




?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時請結(jié)合常識與多方信息審慎甄別。
平臺聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點,簡書系信息發(fā)布平臺,僅提供信息存儲服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

友情鏈接更多精彩內(nèi)容