### copy data into 'dat' and examine data
dat <- dat.hackshaw1998
head(dat, 10)
if (FALSE) {
### load metafor package
library(metafor)
### random-effects model using the log odds ratios
res <- rma(yi, vi, data=dat, method="DL")
res
### estimated average odds ratio with CI (and prediction interval)
predict(res, transf=exp, digits=2)
### illustrate how the log odds ratios and corresponding sampling variances
### can be back-calculated based on the reported odds ratios and CI bounds
dat$yi <- NULL
dat$vi <- NULL
dat <- data.frame(dat)
head(dat, 10)
dat <- conv.wald(out=or, ci.lb=or.lb, ci.ub=or.ub, data=dat, transf=log)
head(dat, 10)
}
Run the code above in your browser using DataLab