Closed Rscho314 closed 4 years ago
I cannot reproduce the problem with the following R code:
m1 <- metacont(10 + 1:4, 1:4, c(1:2, NA, 4),
10 + 1:4, 1:4, c(1:2, NA, 4))
m1
forest(m1)
m2 <- metacont(10 + c(1:4, NA), c(1:4, NA), c(1:2, NA, 4, NA),
10 + c(1:4, NA), c(1:4, NA), c(1:2, NA, 4, NA))
m2
forest(m2)
Which R code are you using to generate the forest plot?
BTW, k is the number of studies contributing data to the meta-analysis which is 10 in both your examples.
The behaviour seems to appear by setting allstudies = F
in forest
in my code. Sorry, I should absolutely have mentioned that!
BTW, k is the number of studies contributing data to the meta-analysis which is 10 in both your examples.
Indeed, that was what I meant. In metacont
, k
does not seem to account for the study with only central tendency and forest
seems to always display k
studies when using allstudies = F
, therefore missing the last one.
So this exhibits the behaviour I described:
m1 <- metacont(10 + 1:4, 1:4, c(1:2, NA, 4),
10 + 1:4, 1:4, c(1:2, NA, 4))
forest(m1, allstudies = F) # yields Warning Message: In forest.meta(m1, allstudies = F) : n.stud != sum(sel)
m2 <- metacont(10 + 1:4, c(1:2, NA, 4), c(1:2, NA, 4),
10 + 1:4, c(1:2, NA, 4), c(1:2, NA, 4))
forest(m2, allstudies = F)
forest(m1, allstudies = F)
does not display study 4.
Perhaps this is intended and I am misunderstanding?
Thank you for pointing out this bug (and the example R code).
Using the
forest
function to plot results frommetacont
where a study has only central tendency but not spread (SD) available causes the plot to display the study with missing spread but excludes the last study from the plot. This is apparently caused bymetacont
not accounting for studies with missing spread ink
.Demo
Metacont with study causing the problem (Zuurbier 2008)
Metacont without study causing the problem (Zuurbier 2008)
In both cases,
metacont
results reportk = 10
.You'll notice that removing central tendency data for
zuurbier 2008
correctly removedzuurbier 2008
from the plot, but also allowedellenberger 2018
to appear in the plot, while it was excluded before.