forest.bayesmeta: Generate a forest plot for a 'bayesmeta' object (based on the...

View source: R/bayesmeta.R

forest.bayesmetaR Documentation

Generate a forest plot for a bayesmeta object (based on the metafor package's plotting functions).

Description

Generates a forest plot, showing individual estimates along with their 95 percent confidence intervals, resulting effect estimate and prediction interval.

Usage

  ## S3 method for class 'bayesmeta'
forest(x, xlab="effect size", refline=0, cex=1,...)

Arguments

x

a bayesmeta object.

xlab

title for the x-axis.

refline

value at which a vertical ‘reference’ line should be drawn (default is 0). The line can be suppressed by setting this argument to ‘NA’.

cex

character and symbol expansion factor.

...

other arguments.

Details

Generates a simple forest plot illustrating the underlying data and resulting estimates (effect estimate and prediction interval).

Note

This function requires the metafor package to be installed.

Author(s)

Christian Roever christian.roever@med.uni-goettingen.de

References

C. Lewis and M. Clarke. Forest plots: trying to see the wood and the trees. BMJ, 322:1479, 2001. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1136/bmj.322.7300.1479")}.

R.D. Riley, J.P. Higgins and J.J. Deeks. Interpretation of random effects meta-analyses. BMJ, 342:d549, 2011. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1136/bmj.d549")}.

See Also

bayesmeta, forest.default, addpoly, forestplot.bayesmeta

Examples

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")

## End(Not run)

bayesmeta documentation built on July 9, 2023, 5:12 p.m.