[R-meta] question on forestplot by Metafor

Frank van Boven |@v@nboven5 @end|ng |rom gm@||@com
Fri Apr 28 19:25:16 CEST 2023


Dear all,

May be a little bit a not expected question, I would like to produce a forestplot without the polygon (diamond) at the bottom.
The rationale for not presenting an overall-effect follows from non-statistical viewpoints.
By erasing it, the figure loses quality (see figure).
Is there a way to chose transparant or white for plotting the polygon (without losing the dashed ref-line).
Enclosed part of the codes.

par(mar=c(4,4,1,2))
forest(res, slab = paste(dat44$Author, dat44$Year, sep = ", "), xlim = c(-20, 10), at=c(-3.0, -1.0, 0, 2.0), refline = 0, 
rows=c(25:22, 18:16, 12:12, 9:5, 1:1),ylim=c(-1, 30), cex = 0.75, ilab=cbind(dat44$n1, dat44$n2), ilab.xpos= c(-9, -7))

op <- par(cex = 0.75, font = 2)
text(-20, 30, "Asthma symptom scores", pos = 4)
text(-20, 29, "Author; Year", pos = 4)
text (-10.5, 27, "Sample sizes",pos = 4)
text (c(-10, -8), 26, c("n1","n2"), font = 1, pos = 4)
text(10, 29, "SMD [95% CI]", pos = 2)
text(-20, c(26, 19, 13, 10,2), pos=4, c("Concurrent - One barrier", "Concurrent - Two barriers",
"Concurrent - Three barriers", "Concurrent - Other versions", "Air purification - Nocturnal"))
text(-20,-1, "RE Model", pos  = 4, cex = 1.0, font = 1, col = "white")

res.1 <- rma(yi, vi, subset=(Strategy=="Concurrent_one"), data = dat44)
res.1


addpoly(res.1, cex = 1.0, font = 2, row = 21.0)
text(-20,21, "RE Model", pos  = 4, cex = 1.0, font = 2, col = "white")
text(-20,21, "     SMD for subgroup", pos  = 4, cex = 1.0, font = 2)

par(op)

Looking forward for your reply.

Kind regards,

Frank van Boven


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://stat.ethz.ch/pipermail/r-sig-meta-analysis/attachments/20230428/2b45beb9/attachment-0001.html>

-------------- next part --------------
A non-text attachment was scrubbed...
Name: example forestplot ASS.jpg
Type: image/jpeg
Size: 102156 bytes
Desc: not available
URL: <https://stat.ethz.ch/pipermail/r-sig-meta-analysis/attachments/20230428/2b45beb9/attachment-0001.jpg>


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