[R] Metafor and forest(); not showing 'ilab' and text

Marco Colagrossi marco.colagrossi at gmail.com
Mon Aug 24 16:03:43 CEST 2015


Hello folks,

I have a couple of issues with the metafor package, specifically with
the forest graphs.
I am currently conducting a Meta-Analysis in economics throughout the
metafor package.

My meta-analysis has the specific of having different cases from
single studies, and this proven to be challenging especially when
trying to plot graphically the results I'm obtaining.

Here's the code:

forest(pc, var, ci95m, ci95p, slab = authoryear, psize=1, subset=(pub==1),
       ilab = cbind(ys, f_dim, SIMdv, SIMiv),
       ilab.xpos = c(-9.5, -8, -6, -4.5), cex = 0.75)
par(font=2)
      text(c(-9.5,-8,-6,-4.5), 26, c("Years", "Firm(s) Dimension", "DV", "IV"))
      text(-16,                26, "Author(s) and Year",     pos=4)
      text(6,                  26, "Observed Outcome [95% CI]", pos=2)
par(op)

'pc' is the 'effect size', 'var' the variance, 'ci95m & ci95p' the CI,
'pub' if the paper has been published or not. the pub subset was the
first idea I had in order to split my sample that otherwise would have
been to big. The issue with this solution is that forest() displays
only the slap argument and the forest with the confidence interval,
completely ignoring the lab argument and the text I'm trying to add.
Moreover, the graph is showed correctly only within the zoom in
Rstudio but if I save it it is showed as enclosed.

What I'm doing wrong? I tried both to look at the package
documentation and online but I can't figure it out.

Moreover, how would you suggest to handle (graphically) the
multiple-cases-per-study thing? It's a 'good' way to average the cases
among different studies in the graphs?
In my meta-analysis I'm using a multilevel model as shown in
Gelman-Hill but graphically (and in tables) I'm struggling.

Thanks for your help and patience



More information about the R-help mailing list