# [R-meta] weights in forest plot

Viechtbauer, Wolfgang (SP) wolfg@ng@viechtb@uer @ending from m@@@trichtuniver@ity@nl
Mon Aug 27 13:55:43 CEST 2018

```You need to create some space for the polygon using ylim:

hedgesg = c(-0.19, 0.10, 0.26, 0.60, 0.25)
sei <- c(.16, .07, .18, .13, .11)
ci.lb <- hedgesg - 1.96*sei
ci.ub <- hedgesg + 1.96*sei
study<-c("Study 1", "Study 2", "Study 3", "Study 4", "Study 5")
labels<-c(-2, -1, 0, 1, 2)

forest(hedgesg, ci.lb=ci.lb, ci.ub=ci.ub, showweights=TRUE, refline=0, xlab
= "Hedges' g", slab=study, alim = c(-2,2), xlim=c(-8,5), at=labels, cex =
0.9, ylim=c(-1.5,8))
addpoly(x = 0.5, ci.lb=0.35, ci.ub=0.65)
abline(h=0)

Best,
Wolfgang

-----Original Message-----
From: Antonia Sudkaemper [mailto:a.sudkaemper using gmail.com]
Sent: Monday, 27 August, 2018 13:23
To: lists using dewey.myzen.co.uk
Cc: Viechtbauer, Wolfgang (SP); r-sig-meta-analysis using r-project.org
Subject: Re: [R-meta] weights in forest plot

Hello again,

thank you, Michael!

I am trying with the addpoly.default (see below) command but nothing at all happens? Like, the forest plot is created but no polygons appear in the plot, even though I am not sure why that would be?

hedgesg = c(-0.19, 0.10, 0.26, 0.60, 0.25)
sei <- c(.16, .07, .18, .13, .11)
ci.lb <- hedgesg - 1.96*sei
ci.ub <- hedgesg + 1.96*sei
study<-c("Study 1", "Study 2", "Study 3", "Study 4", "Study 5")
labels<-c(-2, -1, 0, 1, 2)

forest(hedgesg, ci.lb=ci.lb, ci.ub=ci.ub, showweights=TRUE, refline=0, xlab = "Hedges' g", slab=study, alim = c(-2,2), xlim=c(-8,5), at=labels, cex = 0.9)
addpoly.default(x = 0.5, ci.lb=0.35, ci.ub=0.65)
```

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