[R-meta] question on forestplot by Metafor
Frank van Boven
|@v@nboven5 @end|ng |rom gm@||@com
Sat Apr 29 16:31:39 CEST 2023
Dear Wolfgang,
Thank you very much, this is what I was looking for.
Kind regards,
Frank van Boven
> Op 29 apr. 2023, om 13:25 heeft Viechtbauer, Wolfgang (NP) <wolfgang.viechtbauer using maastrichtuniversity.nl> het volgende geschreven:
>
> And of course I meant the 'addfit' argument.
>
>> -----Original Message-----
>> From: Viechtbauer, Wolfgang (NP)
>> Sent: Friday, 28 April, 2023 19:38
>> To: 'R Special Interest Group for Meta-Analysis'
>> Cc: Frank van Boven
>> Subject: RE: [R-meta] question on forestplot by Metafor
>>
>> Dear Frank,
>>
>> See
>>
>> https://wviechtb.github.io/metafor/reference/forest.rma.html
>>
>> and in particular the 'addpred' argument.
>>
>> Best,
>> Wolfgang
>>
>>> -----Original Message-----
>>> From: R-sig-meta-analysis [mailto:r-sig-meta-analysis-bounces using r-project.org] On
>>> Behalf Of Frank van Boven via R-sig-meta-analysis
>>> Sent: Friday, 28 April, 2023 19:25
>>> To: R Special Interest Group for Meta-Analysis
>>> Cc: Frank van Boven
>>> Subject: [R-meta] question on forestplot by Metafor
>>>
>>> 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
More information about the R-sig-meta-analysis
mailing list