Skip to content
Prev 2543 / 5636 Next

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

Apologies for not CC?ing the mailing list.



As a last question, is there a way for me to make each of these polygons a different colour as opposed to all the same:



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=23)", "Deprivation (k=14)", "Composite (k=77)"),

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

       top=2, refline=NA, xlim=c(-3,1), at=log(c(.2, .5, 1)), psize=1, efac=0)



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)







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 20, 2020 3:26 PM
To: Dylan Johnson<mailto:dylanr.johnson at mail.utoronto.ca>
Cc: R meta<mailto:r-sig-meta-analysis at r-project.org>
Subject: RE: Putting pooled effects from different multilevel meta analyses into the same forest plot



EXTERNAL EMAIL:

Please always cc the mailing list when replying.

You could use addpoly() to draw the polygons on top. Continuing with the example:

addpoly(c(coef(res.r), coef(res.n), coef(res)),
        c(vcov(res.r), vcov(res.n), vcov(res)),
        rows=3:1, efac=2, annotate=FALSE)

Best,
Wolfgang