The metafor Package

A Meta-Analysis Package for R

User Tools

Site Tools


plots:forest_plot_with_subgroups

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Last revisionBoth sides next revision
plots:forest_plot_with_subgroups [2021/05/16 16:06] Wolfgang Viechtbauerplots:forest_plot_with_subgroups [2022/04/22 11:17] Wolfgang Viechtbauer
Line 37: Line 37:
 ### used to specify in which rows the outcomes will be plotted) ### used to specify in which rows the outcomes will be plotted)
 forest(res, xlim=c(-16, 4.6), at=log(c(0.05, 0.25, 1, 4)), atransf=exp, forest(res, xlim=c(-16, 4.6), at=log(c(0.05, 0.25, 1, 4)), atransf=exp,
-       ilab=cbind(dat$tpos, dat$tneg, dat$cpos, dat$cneg), +       ilab=cbind(tpos, tneg, cpos, cneg), ilab.xpos=c(-9.5,-8,-6,-4.5), 
-       ilab.xpos=c(-9.5,-8,-6,-4.5), cex=0.75, ylim=c(-1, 27), +       cex=0.75, ylim=c(-1, 27), order=alloc, rows=c(3:4,9:15,20:23),
-       order=dat$alloc, rows=c(3:4,9:15,20:23),+
        mlab=mlabfun("RE Model for All Studies", res),        mlab=mlabfun("RE Model for All Studies", res),
        psize=1, header="Author(s) and Year")        psize=1, header="Author(s) and Year")
Line 67: Line 66:
  
 ### add summary polygons for the three subgroups ### add summary polygons for the three subgroups
-addpoly(res.s, row=18.5, cex=0.75, atransf=exp, mlab=mlabfun("RE Model for Subgroup", res.s)) +addpoly(res.s, row=18.5, mlab=mlabfun("RE Model for Subgroup", res.s)) 
-addpoly(res.r, row= 7.5, cex=0.75, atransf=exp, mlab=mlabfun("RE Model for Subgroup", res.r)) +addpoly(res.r, row= 7.5, mlab=mlabfun("RE Model for Subgroup", res.r)) 
-addpoly(res.a, row= 1.5, cex=0.75, atransf=exp, mlab=mlabfun("RE Model for Subgroup", res.a))+addpoly(res.a, row= 1.5, mlab=mlabfun("RE Model for Subgroup", res.a))
  
 ### fit meta-regression model to test for subgroup differences ### fit meta-regression model to test for subgroup differences
plots/forest_plot_with_subgroups.txt · Last modified: 2023/09/21 19:09 by Wolfgang Viechtbauer