guido-s / meta

Official Git repository of R package meta
http://cran.r-project.org/web/packages/meta/index.html
GNU General Public License v2.0
82 stars 32 forks source link

tau squared = NA when using forest.metabind() #22

Closed fmmattioni closed 4 years ago

fmmattioni commented 4 years ago

I have just noticed that when using metabind to combine two meta objects (not subgroups), the tau squared value appears as NA in the forest plot.

This happens both from the latest CRAN version as well as from dev version.

reprex:

library(meta)
#> Loading 'meta' package (version 4.11-0).
#> Type 'help(meta)' for a brief overview.

data(Fleiss93cont)

m1 <- metacont(n.e, mean.e, sd.e, n.c, mean.c, sd.c,
               data = Fleiss93cont, sm = "MD")

m2 <- metacont(n.e, mean.e, sd.e, n.c, mean.c, sd.c,
               data = Fleiss93cont, sm = "MD")

mb1 <- metabind(m1, m2)
#> Warning in metabind(m1, m2): Note, results from random effects model extracted.
#> Use argument pooled = "fixed" for results of fixed effect model.
mb1
#>              MD             95%-CI meta-analysis
#> overall -0.7373 [-1.4577; -0.0170]         meta1
#> overall -0.7373 [-1.4577; -0.0170]         meta2
#> 
#> Number of studies combined: k = 5
#> 
#>                           MD             95%-CI     z p-value
#> Random effects model -0.7373 [-1.4577; -0.0170] -2.01  0.0448
#> 
#> Quantifying heterogeneity:
#>  tau^2 = 0.1894; tau = 0.4352; I^2 = 29.3% [0.0%; 72.6%]; H = 1.19 [1.00; 1.91]
#> 
#> Test of heterogeneity:
#>     Q d.f. p-value
#>  5.66    4  0.2260
#> 
#> Results for meta-analyses (random effects model):
#>         k      MD             95%-CI  tau^2    tau    Q   I^2
#> meta1   5 -0.7373 [-1.4577; -0.0170] 0.1894 0.4352 5.66 29.3%
#> meta2   5 -0.7373 [-1.4577; -0.0170] 0.1894 0.4352 5.66 29.3%
#> 
#> Details on meta-analytical method:
#> - Inverse variance method
#> - DerSimonian-Laird estimator for tau^2
forest(mb1)

Created on 2020-03-20 by the reprex package (v0.3.0)

fmmattioni commented 4 years ago

Hi @guido-s, I was wondering if you have any thoughts on the issue above?

guido-s commented 4 years ago

Apologies for the very late reply. I have fixed this bug in version 4.12-0 of meta.