Skip to content

metaplot

8 messages · Scott Chamberlain, cheba meier, Viechtbauer Wolfgang (STAT)

#
Actually, Scott suggested ggplot2, which is available on CRAN:

http://cran.r-project.org/web/packages/ggplot2/index.html

Moreover, for the metafor package, you do not need "(a,b,c,d) or standard errors for the effect estimates". 

rr <- c(0.61, 0.35, 1.16, 0.94, 1.16, 0.46, 0.99, 1.05, 1.15, 0.27)
lci <- c(-1.69, -1.27, -0.24, -0.54, -1.01, -1.8,-0.89, -1.38, -1.05,-2.04)
uci <- c(0.70, -0.82,0.54,0.41,1.30,0.24,0.87,1.48,1.33,-0.57)

The lci and uci values are obviously the log-transformed values of the upper and lower CI bounds for the RR. So, you could do:

library(metafor)
forest(log(rr), ci.lb=lci, ci.ub=uci, xlab="Log Relative Risk")

or:

forest(log(rr), ci.lb=lci, ci.ub=uci, xlab="Relative Risk", atransf=exp)

help(forest.default) will tell you more about using the forest() function.

Best,

--
Wolfgang Viechtbauer
Department of Psychiatry and Neuropsychology
School for Mental Health and Neuroscience
Maastricht University, P.O. Box 616
6200 MD Maastricht, The Netherlands
Tel: +31 (43) 368-5248
Fax: +31 (43) 368-8689
Web: http://www.wvbauer.com