为什么文本没有添加到 R metafor-package 中的森林图中?

Why is text not added to forest plot in R metafor-package?

我的数据:

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 进行元分析。我想在我的森林图中添加一些文本作为情节图的 "head labels"。 我遵循了 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)

我的森林图是这样的:

你能帮帮我吗? 提前致谢, C.

text() 的第二个参数指定应添加文本的 y 轴位置。您为此指定了 15,但这超出了绘图限制。此处设置值89应该比较合适。