[R-meta] Question on metafor forest plot

Gabriel Cotlier g@b|k|m01 @end|ng |rom gm@||@com
Tue Jun 6 14:15:03 CEST 2023


Hello Wolfgang,
Thanks a lot!!
It is super helpful guidance.
Kind regards,
Gabriel

On Tue, Jun 6, 2023 at 2:58 PM Viechtbauer, Wolfgang (NP) <
wolfgang.viechtbauer using maastrichtuniversity.nl> wrote:

> Dear Gabriel,
>
> The point sizes can also be set manually via the 'psize' argument. For
> example:
>
> dat <- dat.bcg
> dat <- escalc(measure="RR", ai=tpos, bi=tneg, ci=cpos, di=cneg,
>               data=dat, slab=paste0(author, ", ", year))
> res <- rma(yi, vi, data=dat)
>
> forest(res, header=TRUE, top=2)
>
> forest(res, header=TRUE, top=2, cex=1.5, psize=weights(res)/10)
>
> You can play around with the factor in weights(res)/10 until you like the
> size. Or just use psize=1 (or some other constant) to not draw points in
> different sizes.
>
> The other thing that changes is the height of the lines at the end of the
> CI bounds and the size of the summary polygon. These can be controlled via
> the 'efac' argument. For example:
>
> forest(res, header=TRUE, top=2, cex=1.5, psize=weights(res)/10, efac=0.7)
>
> Again, play around with efac until you like how it looks. You can also
> specify two values for the lines at the end of the CI bounds and the
> summary polygon separately. For example:
>
> forest(res, header=TRUE, top=2, cex=1.5, psize=weights(res)/10,
> efac=c(0,0.7))
>
> Best,
> Wolfgang
>
> >-----Original Message-----
> >From: R-sig-meta-analysis [mailto:
> r-sig-meta-analysis-bounces using r-project.org] On
> >Behalf Of Gabriel Cotlier via R-sig-meta-analysis
> >Sent: Tuesday, 06 June, 2023 13:29
> >To: r-sig-meta-analysis using r-project.org
> >Cc: Gabriel Cotlier
> >Subject: [R-meta] Question on metafor forest plot
> >
> >Hello all,
> >
> >I would like to ask how can I modify the size of the text font in a
> >metrafor package forest plot  without modifying the size of the size
> effect
> >points and their error bars?
> >
> >I have tried to use cex but this argument indeed increases the text fonts
> >size but also increases the size effect points and their error bars as
> well.
> >
> >Thanks a lot for your help.
> >regards,
>

	[[alternative HTML version deleted]]



More information about the R-sig-meta-analysis mailing list