我的数据:
dat <- structure(list(study = structure(c(2L, 6L, 7L, 4L, 1L, 3L, 5L), .Label = c("Ansari et al.", "De Santis et al.", "Dewan et al.", "Garbossa et al.", "lockney et al", "Sughrue et al. ", "Wu et al."), class = "factor"), year = c(2002L, 2011L, 2013L, 2013L, 2014L, 2017L, 2017L), event.e = c(13L, 0L, 15L, 8L, 34L, 17L, 8L), n.e = c(100L, 129L, 61L, 43L, 134L, 301L, 162L), event.c = c(11L, 1L, 11L, 9L, 12L, 1L, 9L), n.c = c(100L, 51L, 62L, 48L, 68L, 41L, 234L), ntotal = c(200L, 180L, 123L, 91L, 202L, 342L, NA), yi = structure(c(0.167054084663166, -2.02071136213801, 0.32641544917562, -0.00778214044205483, 0.363121780053356, 0.839675146011648, 0.249941744468934), measure = "OR", ni = c(224L, 181L, 149L, 108L, 248L, 360L, 413L)), vi = c(0.187832167832168, 2.69380615011683, 0.190098232456773, 0.280200258397933, 0.134913666959321, 1.08653603245042, 0.246557454890788), author = structure(c(2L, 6L, 7L, 4L, 1L, 3L, 5L), .Label = c("Ansari et al.", "De Santis et al.", "Dewan et al.", "Garbossa et al.", "lockney et al", "Sughrue et al. ", "Wu et al."), class = "factor")), .Names = c("study", "year", "event.e", "n.e", "event.c", "n.c", "ntotal", "yi", "vi", "author"), row.names = c(NA, -7L), digits = 4, yi.names = "yi", vi.names = "vi", class = c("escalc", "data.frame"))
我使用metafor-package进行荟萃分析。我想在我的森林情节中添加一些文字作为&#34;头标签&#34;为情节图。 我已经按照metafor-guide进行了操作,但是文本没有添加。我无法弄清楚为什么。
我的森林情节:
library(metafor)
par(mar=c(4,4,1,2))
res <- rma(yi, vi, data=dat, slab=paste(author, year, sep=", "))
tmp <- cumul(res, order=order(dat$year))
forest(tmp, xlim=c(-4,2), at=log(c(0.125, 0.25, 0.5, 1, 2)),
atransf=exp, digits=c(2,3), cex=0.75)
par(cex=0.75, font=2)
text(-4, 15, "Author(s) and Year", pos=4)
text( 2, 15, "Odds Ratio [95% CI]", pos=2)
My Forest Plot看起来像这样:
你能帮帮我吗? 提前致谢, C.答案 0 :(得分:1)
text()
的第二个参数指定了应添加文本的位置的y轴位置。您为此指定了15
,但这超出了地图限制。将值设置为8
或9
应该适合此处。