我使用metafor包在r中有一个foresplot:
#forestplot
par(mar=c(2.75,0,0,0))
par(font=2,mgp=c(2.3, 0.8, 0), xaxs = "i")
metafor::forest.rma(res, alim=c(-1, 3.75), xlim = c(-5, 3.5), at =
c(-1, -.5, 0 , .5, 1, 1.5, 2, 2.5, 3), xlab = "Cohen's D with 95% CI",
slab = data$Author, annotate = FALSE,
cex=.6, cex.lab = 0.5, refline = 0.68)
我想在每次观察的置信区间结束时删除刻度,但是没有找到明确的方法。换句话说,置信区间只是水平线,最后没有垂直。谁会有任何想法如何这样做?
将efac
的metafor::forest.rma
参数设置为c(0,1)
:第一个值是CI限制和箭头的垂直扩展因子;第二个是概要估算。
library(metafor)
res <- rma(measure="RR", ai=tpos, bi=tneg, ci=cpos, di=cneg, data=dat.bcg,
slab=paste(author, year, sep=", "))
par(mar=c(2.75,0,0,0))
par(font=2,mgp=c(2.3, 0.8, 0), xaxs = "i")
forest(res, alim=c(-1, 3.75), xlim = c(-5, 3.5), at =
c(-1, -.5, 0 , .5, 1, 1.5, 2, 2.5, 3), xlab = "Cohen's D with 95% CI",
annotate = FALSE, cex=0.8, cex.lab=0.8, refline = 0.68, efac=c(0,1))