Search code examples
rr-forestplot

Customizing forest plot for a network meta-analysis


I'm new with meta-analysis and I wonder if it is possible to customize the resulting forest plot

data(Senn2013)
net1 <- netmeta(TE, seTE, treat1, treat2, studlab,
        data=Senn2013, sm="MD", reference="plac")

forest(net1, ref="plac", digits=1, just="right")

enter image description here

For example: i) to remove the placebo reference treatment; ii) to change the results digits; iii) to add a column with the numbers of studies for each treatment; iv) sort the treatments by the estimated effect size.

I really appreciate some help on this...

This plot is done based on @Guido Schwarzer reply (just what I needed):

enter image description here


Solution

  • Customizations i) - iv) do not work with the current version of netmeta on CRAN. Actually, ii) number of digits should have worked (but did not) whereas i), iii), and iv) had not been implemented.

    I changed forest.netmeta() in the development version of netmeta on GitHub such that all customizations work.

    ## install.packages("devtools")
    devtools::install_github("guido-s/meta")
    devtools::install_github("guido-s/netmeta", ref = "develop")
    
    library(netmeta)
    data(Senn2013)
    net1 <- netmeta(TE, seTE, treat1, treat2, studlab,
                    data=Senn2013, sm="MD", reference="plac")
    
    forest(net1, digits = 1, sortvar = TE,
           drop.reference.group = TRUE,
           leftcols = c("studlab", "k"),
           leftlabs = c("Contrast\nto Placebo", "Direct\nComparisons"),
           just.studlab = "right", just.addcols = "left")
    

    Installation of the GitHub version of meta is not strictly necessary, however, fixes a minor bug in forest.meta() in the column label for the column with study numbers (which is an additional column in jargon of forest.meta()).

    Please note that column "k" prints the number of studies providing direct evidence to the comparison of a treatment with the reference (here: placebo) and not the overall number of studies for a treatment. This seems more appropriate to me as the forest plot "only" shows results for treatment comparisons with the reference. In principle you could use the new argument add.data to add a column with the overall number of studies for each treatment, however, interpretation of these numbers seems difficult to me.