Skip to content
Prev 2549 / 5636 Next

[R-meta] Putting pooled effects from different multilevel meta analyses into the same forest plot

Hello,



Is there any reason that the plotwidth function isn?t working with the following forest plot:



dev.new(width=10, height=1)

forest(c(coef(m.overall), coef(m.overall2), coef(m.overall3)),

       c(vcov(m.overall), vcov(m.overall2), round(vcov(m.overall3), digits = 3)),

       slab=c("Threat (k=39)", "Deprivation (k=45)", "Composite (k=125)"),

       header=c("Inhibitory Control", "Hedge's g [95% CI]"), xlab="Hedge's g",

       top=2, refline=NA, xlim=c(-3.2,1), at=(c(0,-0.25,-0.50,-0.75)), psize=1, efac=0, plotwidth=unit(6, "cm") )

addpoly(c(coef(m.overall), coef(m.overall2), coef(m.overall3)),

        c(vcov(m.overall), vcov(m.overall2), vcov(m.overall3)),

        rows=3:1, efac=2, annotate=FALSE, col = 2, border = 2)



It doesn?t seem to change the width of the forest plot no matter what values I type in.



Thank you



Dylan Johnson, MSc

MA Student, School and Clinical Child Psychology
Department of Applied Psychology and Human Development

University of Toronto
252 Bloor Street West

Toronto, ON M5S 1V6



From: Viechtbauer, Wolfgang (SP)<mailto:wolfgang.viechtbauer at maastrichtuniversity.nl>
Sent: December 21, 2020 10:55 AM
To: Michael Dewey<mailto:lists at dewey.myzen.co.uk>; Dylan Johnson<mailto:dylanr.johnson at mail.utoronto.ca>
Cc: r-sig-meta-analysis at r-project.org<mailto:r-sig-meta-analysis at r-project.org>
Subject: RE: [R-meta] Putting pooled effects from different multilevel meta analyses into the same forest plot



EXTERNAL EMAIL:

As Michael suggested. Or, if you install the 'devel' version of metafor, then 'col' will also take a vector of colors in addpoly().

Best,
Wolfgang