### copy data into 'dat' and examine data
dat <- dat.hahn2001
dat
if (FALSE) {
### load metafor package
library(metafor)
### meta-analysis of (log) odds rations using the Mantel-Haenszel method
res <- rma.mh(measure="OR", ai=ai, n1i=n1i, ci=ci, n2i=n2i, data=dat, digits=2, slab=study)
res
### forest plot (also show studies that were excluded from the analysis)
options(na.action="na.pass")
forest(res, atransf=exp, xlim=c(-11,9), at=log(c(0.01, 0.1, 1, 10, 100)))
options(na.action="na.omit")
}
Run the code above in your browser using DataLab