[R-meta] Forest plot with subplots

Gerta Ruecker ruecker at imbi.uni-freiburg.de
Wed Jan 17 12:27:13 CET 2018


Dear Roberto,

You may use the R package meta 
https://cran.r-project.org/web/packages/meta/index.html .

Depending on the type of your data, meta-analysis is done using one of 
the functions metabin() (binary data), metacont (continuous data), 
metagen (generic data, given effect estiamte and its standard error) and 
futher functions, see 
https://cran.r-project.org/web/packages/meta/meta.pdf (or type 
help(package = "meta")). Subgroup analyses can be done using the 
argument byvar, see, for example, help(metabin). Forest plots applied to 
a meta object where byvar has been used then show subplots as desired.

For a simple example, see attached.

Best,

Gerta


Am 17.01.2018 um 11:05 schrieb P. Roberto Bakker:
> Hi,
>
> I am performing meta-analyses of different medication groups, and would
> like to create one forest plot containing subplots of the separate
> meta-analysis per group,  and the total result of all meta-analyses.
> How can I create this?
>
> Thank you in advance,
>
> Roberto
>
> 	[[alternative HTML version deleted]]
>
> _______________________________________________
> R-sig-meta-analysis mailing list
> R-sig-meta-analysis at r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-meta-analysis

-- 

Dr. rer. nat. Gerta Rücker, Dipl.-Math.

Institute of Medical Biometry and Statistics,
Faculty of Medicine and Medical Center - University of Freiburg

Stefan-Meier-Str. 26, D-79104 Freiburg, Germany

Phone:    +49/761/203-6673
Fax:      +49/761/203-6680
Mail:     ruecker at imbi.uni-freiburg.de
Homepage: https://portal.uni-freiburg.de/imbi/persons/ruecker?set_language=en

-------------- next part --------------
install.packages("meta")
library(meta)

data(Olkin95)
meta1 <- metabin(event.e, n.e, event.c, n.c,
                 data=Olkin95, subset=c(41,47,51,59),
                 sm="RR", method="I", byvar=ifelse(year < 1987, "Before 1987", "1987 and later"),
                 studlab=paste(author, year))

forest(meta1, sortvar=-TE, comb.random=FALSE, print.byvar = FALSE)


More information about the R-sig-meta-analysis mailing list