bayesmeta
object
(based on the metafor
package's plotting functions).Generates a forest plot, showing individual estimates along with their 95 percent confidence intervals, resulting effect estimate and prediction interval.
# S3 method for bayesmeta
forest(x, xlab="effect size", refline=0, cex=1,...)
a bayesmeta
object.
title for the x-axis.
value at which a vertical ‘reference’ line should be drawn (default is 0). The line can be suppressed by setting this argument to ‘NA’.
character and symbol expansion factor.
other arguments.
Generates a simple forest plot illustrating the underlying data and resulting estimates (effect estimate and prediction interval).
C. Lewis and M. Clarke. Forest plots: trying to see the wood and the trees. BMJ, 322:1479, 2001.
R.D. Riley, J.P. Higgins and J.J. Deeks. Interpretation of random effects meta-analyses. BMJ, 342:d549, 2011.
# NOT RUN {
data("CrinsEtAl2014")
# }
# NOT RUN {
# compute effect sizes (log odds ratios) from count data
# (using "metafor" package's "escalc()" function):
require("metafor")
es.crins <- escalc(measure="OR",
ai=exp.AR.events, n1i=exp.total,
ci=cont.AR.events, n2i=cont.total,
slab=publication, data=CrinsEtAl2014)
# derive a prior distribution for the heterogeneity:
tp.crins <- TurnerEtAlPrior("surgical", "pharma", "placebo / control")
# perform meta-analysis:
ma.crins <- bayesmeta(es.crins, tau.prior=tp.crins$dprior)
########
# plot:
forest(ma.crins, xlab="log odds ratio")
forest(ma.crins, trans=exp, refline=1, xlab="odds ratio")
# }
Run the code above in your browser using DataLab