### copy data into 'dat' and examine data
dat <- dat.cannon2006
dat
if (FALSE) {
### load metafor package
library(metafor)
### meta-analysis of log odds ratios using the MH method for endpoint 1
res <- rma.mh(measure="OR", ai=ep1t, n1i=nt, ci=ep1c, n2i=nc, data=dat, slab=trial)
print(res, digits=2)
### forest plot
forest(res, xlim=c(-.8,0.8), atransf=exp, at=log(c(2/3, 1, 3/2)),
cex=1.2, xlab="Odds Ratio")
mtext("(high dose better)", side=1, line=par("mgp")[1]-0.5, at=log(2/3), cex=1.2, font=3)
mtext("(standard dose better)", side=1, line=par("mgp")[1]-0.5, at=log(3/2), cex=1.2, font=3)
}
Run the code above in your browser using DataLab