[R] Extract confidence intervals from rma object (metafor package)
Viechtbauer Wolfgang (STAT)
wolfgang.viechtbauer at maastrichtuniversity.nl
Mon Jul 18 19:40:58 CEST 2011
Dear Jokel,
Right now, none of the functions return that information. But it's easy to calculate those CIs by hand (simply take yi +- 1.96 sqrt(vi) and apply, if needed, some appropriate transformation). For example:
data(dat.bcg)
dat <- escalc(measure="RR", ai=tpos, bi=tneg, ci=cpos, di=cneg,
data=dat.bcg, append=TRUE)
exp(dat$yi - 1.96*sqrt(dat$vi))
exp(dat$yi + 1.96*sqrt(dat$vi))
gives you approximate 95% CIs for the RRs. The forest functions essentially do nothing different.
I hope this helps!
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
________________________________________
From: r-help-bounces at r-project.org [r-help-bounces at r-project.org] On Behalf Of Jokel Meyer [jokel.meyer at googlemail.com]
Sent: Monday, July 18, 2011 6:44 PM
To: r-help at r-project.org
Subject: [R] Extract confidence intervals from rma object (metafor package)
Dear R-experts!
I am working on some meta-analysis using the metafor package. I would like
to extract values of the confidence intervals of the effect sizes of the
single studies from an rma object. Those values are printed out when
plotting a forest plot using the forest function on the rma object, however
I was not able to locate them.
Many thanks for your help!
Jokel
[[alternative HTML version deleted]]
______________________________________________
R-help at r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
More information about the R-help
mailing list