### copy data into 'dat' and examine data
dat <- dat.damico2009
dat
if (FALSE) {
### load metafor package
library(metafor)
### meta-analysis of the (log) odds ratios using the Mantel-Haenszel method
rma.mh(measure="OR", ai=xt, n1i=nt, ci=xc, n2i=nc, data=dat, digits=2)
### calculate log odds ratios and corresponding sampling variances
dat <- escalc(measure="OR", ai=xt, n1i=nt, ci=xc, n2i=nc, data=dat)
### meta-analysis using a random-effects model
res <- rma(yi, vi, data=dat, method="DL")
res
predict(res, transf=exp, digits=2)
}
Run the code above in your browser using DataLab