[R] matafor package: adding additional information under a forest plot

Viechtbauer Wolfgang (STAT) wolfgang.viechtbauer at maastrichtuniversity.nl
Sat May 3 10:45:06 CEST 2014


1) There is no function that will do that automatically for you, but it's easy to do with text() and paste(). If you have fitted a random-effects model with rma(), then you can find the Q-statistic in res$QE, the I^2 statistic in res$I2, and probably whatever else you need, and then just paste() together what you want and add it to the plot via text().

2) If you want to add lots of columns, then indeed you will need a wide plot. You probably want to set up your plotting device to be quite wide. For example, with png(), make sure 'width' is large and you may need to decrease the 'pointsize' to still make it all fit.

Best,
Wolfgang
________________________________________
From: r-help-bounces at r-project.org [r-help-bounces at r-project.org] On Behalf Of Dietlinde Schmidt [schmidt.dietlinde at web.de]
Sent: Friday, May 02, 2014 4:09 PM
To: r-help at r-project.org
Subject: [R] matafor package: adding additional information under a forest plot

Dear R-Users,

i have to questions about plotting a forest plot with the metafor package:

1) Is there a (text()) function to add additional information (e.g.
heterogeneity statistics) under the forest plot?
2) I want to add various columns of additional information about each
study (e.g. quality, time point, measure....). I thought i could do that
with the ilab-argument, but i keep getting in the way with the line that
restricts the plot and although i tweaked everything around, I do not
succeed. Basecally, i want the format of the forest plot to be rather
wide than tall, because i have little studies but many columns with
additional study information. Does someone know how to solve that (over
xlim, ylim???)?

Thanks a lot for your help

Linde


More information about the R-help mailing list