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

Subgroup forest plot does not display using metamean #41

Closed jaadeoye closed 2 years ago

jaadeoye commented 3 years ago

Hi,

I am trying to generate subgroup forest plots for proportion and mean meta-analysis using the 'subgroup' argument in metaprop and metamean functions. The forest plot for the metaprop works very well but I keep getting the error below when I use the 'forest' argument with metamean:

Error in x$labels[[i]] : subscript out of bounds

The argument passed to 'forest' is below:

Number of studies combined: k = 10 Number of observations: o = 4910

                   mean           95%-CI

Random effects model 2.0754 [1.3918; 2.7590]

Quantifying heterogeneity: tau^2 = 1.2092 [0.5682; 4.0494]; tau = 1.0996 [0.7538; 2.0123] I^2 = 99.7% [99.7%; 99.8%]; H = 18.92 [17.54; 20.41]

Test of heterogeneity: Q d.f. p-value 3222.66 9 0

Results for subgroups (random effects model): k mean 95%-CI Population = European 2 1.0373 [ 0.7738; 1.3008] Population = Chinese 3 2.3380 [ 1.1179; 3.5581] Population = Middle East 1 2.7700 [ 2.6262; 2.9138] Population = Indian 2 2.3655 [-0.1727; 4.9036] Population = South and North American 2 2.0990 [ 0.0606; 4.1374] tau^2 tau Q I^2 Population = European 0.0324 0.1800 9.00 88.9% Population = Chinese 1.1524 1.0735 245.20 99.2% Population = Middle East -- -- 0.00 -- Population = Indian 3.3426 1.8283 293.42 99.7% Population = South and North American 2.1598 1.4696 641.59 99.8%

Test for subgroup differences (random effects model): Q d.f. p-value Between groups 128.06 4 < 0.0001

Details on meta-analytical method:

Any help will be appreciated.

John

guido-s commented 2 years ago

John, Thank you for pointing out this bug. Best, Guido