I am practicing meta-analysis using the built-in "dat.bcg" dataset of "metafor" package. There I have performed all the primary analysis except the 'percentage of study contribution'. I have not found how to visualize this. I am attaching one image for your reference.
I want to visualize this above-mentioned image.
Up until now I have been running the following codes.
enter code here
library("metafor")
enter code here
data("dat.bcg", package = "metafor")
enter code here
print(dat.bcg, row.names = FALSE)
enter code here
res <- rma(yi, vi, data = dat)
enter code here
res
enter code here
res = rma(ai = tpos, bi = tneg, ci = cpos, di = cneg, data = dat, measure = "OR")
enter code here
res
enter code here
confint(res)
enter code here
forest(res, slab = paste(dat$author, dat$year, sep = ", "), xlim = c(-16, 6), at = log(c(0.05, 0.25, 1, 4)), atransf = exp, ilab = cbind(dat$tpos, dat$tneg, dat$cpos, dat$cneg), ilab.xpos = c(-9.5, -8, -6, -4.5), cex = 0.75)
enter code here
op <- par(cex = 0.75, font = 2)
enter code here
text(c(-9.5, -8, -6, -4.5), 15, c("TB+", "TB-", "TB+", "TB-"))
enter code here
text(c(-8.75, -5.25), 16, c("Vaccinated", "Control"))
enter code here
text(-16, 15, "Author(s) and Year", pos = 4)
enter code here
text(6, 15, "Relative Risk [95% CI]", pos = 2)
enter code here
par(op)