Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Subgroup forest plot does not display using metamean #41

Closed
jaadeoye opened this issue Nov 24, 2021 · 1 comment
Closed

Subgroup forest plot does not display using metamean #41

jaadeoye opened this issue Nov 24, 2021 · 1 comment

Comments

@jaadeoye
Copy link

jaadeoye commented Nov 24, 2021

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:

  • Inverse variance method
  • Restricted maximum-likelihood estimator for tau^2
  • Q-profile method for confidence interval of tau^2 and tau
  • Untransformed (raw) means

#subgroup_population_ALL
k=metamean(subgroup = Population, n=N, mean=mean, sd = sd, data = met_all, studlab = SN, fixed=FALSE)
forest(k)
Error in x$labels[[i]] : subscript out of bounds

Any help will be appreciated.

John

@guido-s
Copy link
Owner

guido-s commented Nov 29, 2021

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants