[R-meta] Options for generating a forest plot for multilevel subgroup meta-analysis
p||@hk@m @end|ng |rom uogue|ph@c@
Mon Aug 17 00:48:32 CEST 2020
I am a masters student in epidemiology at the University of Guelph's Department of Population Medicine working on my thesis. I am conducting a meta-analysis of proportions, where prevalence is the outcome of interest. I am conducting multiple separate meta-analyses, however, each meta-analysis is relatively small and has less than 15 studies. Some of my meta-analyses have two prevalence estimates for one study. For instance, one of my datasets has 10 prevalence estimates for 9 studies (1 study reports 2 prevalence estimates). As a result, I need to do a multi-level meta-analysis to account for this clustering. I also have subgroups that I would like to group by. However, I do not need to do the multilevel analysis for the subgroups as I do not have multiple estimates per study in each of the subgroups. I mainly need the multilevel analysis for the overall combined prevalence estimate.
Using the rma.mv function from the metafor package, I was able to calculate an overall combined prevalence estimate using a multilevel meta-analysis. However, I am having difficulty finding a good function to generate a forest plot for the multilevel meta-analysis. My data is transformed via the arcsine transformation and then back transformed for ease of interpretation.
Previously, in my meta-analyses that were not multilevel, I used forest.meta from the meta package. I used the results of the metaprop function as the first argument in the forest.meta function. The metaprop function was great as I could calculate the appropriate effect estimate, I2 value and confidence intervals for my data. It also worked very well for the subgroup analyses. However, to the best of my knowledge the metaprop function does not work for multilevel meta-analyses.
Since I am therefore unable to use metaprop and forest.meta, I tried to use the result of the rma.mv function with forest.rma, and back-transform it within the function.
For example, I used the following code: forest(data, transf=transf.ipft, targs=list(ni=data$ni)).
The above code gave me the following error "Error in xy.coords(x, y, setLab = FALSE) : 'x' and 'y' lengths differ". I also tried the same forest function with transf=transf.ipft.hm instead. This worked and it generated a forest plot. However, I do not want the harmonic mean, I want the arithmetic mean.
I did additional research to find a solution. The author of the package answered someone's question (https://stat.ethz.ch/pipermail/r-help/2010-December/263286.html) and stated that transf.ipft does not work with that function and, instead, I have to calculate the back-transformed confidence intervals manually and use these with the forest.default function as follows:
forest(dat$pi, ci.lb=ci.lb, ci.ub=ci.ub, ylim=c(-0.5,8), refline=NA, xlim=c(-.5,1.8), alim=c(0,1), digits=3, xlab="Proportion")
I did this and it worked, however, I was unable to figure out how to show the subgroups with forest.default.
I also tried the forestplot function from the forestplot package. This function allows me to enter in all of the data manually, however, I also could not figure out how to show the subgroups.
I also tried the viz_forest function from the metaviz package, but this function only takes in the standard error and I could not figure out how to give it my own confidence intervals that I calculated. I tried adding in annotate_CI = TRUE to the function, but these confidence intervals are not correct for my purposes and the standard error bars are still printed on the plot (instead of the confidence interval bars).
In addition, I would like the heterogeneity values to be printed at the bottom. The forest.meta function using metaprop gives this to me, but I cannot figure out how to generate this automatically in any of the other forest plot functions.
My primary question is, what is the best option to generate a forest plot for a multilevel meta-analysis with subgroups? Is there a way to use transf=transf.ipft in forest.rma (as this seems to be the ideal option)?
Any help would be greatly appreciated.
Mikayla Plishka, Hons. BA.
MSc Candidate Epidemiology
Department of Population Medicine
Rm 2505, Stewart Building (office)
Ontario Veterinary College
Email: plishkam using uoguelph.ca
[[alternative HTML version deleted]]
More information about the R-sig-meta-analysis