[R-meta] question on forest plot formatring

Michael Dewey ||@t@ @end|ng |rom dewey@myzen@co@uk
Sat Jun 10 16:07:00 CEST 2023


Since presumably my two original suggestions did not work I think I will 
leave this to someone more expert with metafor graphics.

Michael

On 10/06/2023 07:01, Gabriel Cotlier wrote:
> Hello Michael,
> 
> Thanks a lot for your response.
> 
> Since I have a lot of lines in my forest plot (with a large number of 
> correlations ) therefore I am using a small font size in order to make 
> the summary of the model's results line more readable, I thought that 
> maybe it is possible to print in the plot the model's summary results in 
> two lines instead of one, just as a possible option...? Since I 
> mentioned I was using this example as base code: 
> https://www.metafor-project.org/doku.php/plots:forest_plot_with_subgroups <https://www.metafor-project.org/doku.php/plots:forest_plot_with_subgroups> . I think maybe there exist some parameters in the function "mlabfun" could be a possible solution?
> 
> ## a little helper function to add Q-test, I^2, and tau^2 estimate info
> mlabfun<-  function  <http://stat.ethz.ch/R-manual/R-devel/library/base/html/function.html>(text  <http://stat.ethz.ch/R-manual/R-devel/library/graphics/html/text.html>, res)  {
>     list  <http://stat.ethz.ch/R-manual/R-devel/library/base/html/list.html>(bquote  <http://stat.ethz.ch/R-manual/R-devel/library/base/html/bquote.html>(paste  <http://stat.ethz.ch/R-manual/R-devel/library/base/html/paste.html>(.(text  <http://stat.ethz.ch/R-manual/R-devel/library/graphics/html/text.html>),
>        " (Q = ", .(formatC  <http://stat.ethz.ch/R-manual/R-devel/library/base/html/formatC.html>(res$QE, digits=2,format  <http://stat.ethz.ch/R-manual/R-devel/library/base/html/format.html>="f")),
>        ", df = ", .(res$k-  res$p),
>        ", p ", .(metafor  <https://wviechtb.github.io/metafor/reference/metafor-package.html>:::.pval(res$QEp, digits=2, showeq=TRUE, sep=" ")),"; ",
>        I  <http://stat.ethz.ch/R-manual/R-devel/library/base/html/I.html>^2," = ", .(formatC  <http://stat.ethz.ch/R-manual/R-devel/library/base/html/formatC.html>(res$I2, digits=1,format  <http://stat.ethz.ch/R-manual/R-devel/library/base/html/format.html>="f")),"%, ",
>        tau^2," = ", .(formatC  <http://stat.ethz.ch/R-manual/R-devel/library/base/html/formatC.html>(res$tau2, digits=2,format  <http://stat.ethz.ch/R-manual/R-devel/library/base/html/format.html>="f")),")")))}
> 
> Regarding spacing the columns of at right hand side of the plot that is 
> "weight %" and CI fisher's z" I could not find a parameter to space them 
> a tab to make the plot more redabel.
> 
> Thanks a lot.
> Kind regards,
> Gabriel
> 
> 
> On Thu, Jun 8, 2023 at 5:20 PM Michael Dewey <lists using dewey.myzen.co.uk 
> <mailto:lists using dewey.myzen.co.uk>> wrote:
> 
>     Comments in-line
> 
>     On 08/06/2023 11:46, Gabriel Cotlier via R-sig-meta-analysis wrote:
>      > Hello all,
>      > I have taken as an example the following subgroups plot :
>      >
>     https://www.metafor-project.org/doku.php/plots:forest_plot_with_subgroups <https://www.metafor-project.org/doku.php/plots:forest_plot_with_subgroups> and
>      > would like to know if is possible break text line of the
>     results--both for
>      > each subgroup and for the total effect of all groups--in two lines as
>      > follows:
>      > line 1: "RE Model subgroup results : ''
>      > line 2  "(Q = 4.06, df = 1, p = 0.04; I2 = 75.4%, t2 = 0.04)"
> 
>     Haev you tried including an explicit new-line in the string(s)? Note
>     you
>     may need to alter the rows parameter.
> 
>      > Also wanted to ask if the column for either risk ratio--or
>     alternatively
>      > for weights and Fisher's zr-- and the columns for CI can be spaced?
> 
>     Not sure I know wht "spaced" means here but their position is
>     controlled
>     by ilab.xpos I think so you need to experiment there.
> 
>     Michael
> 
>      > Thanks a lot.
>      > Kid regards,
>      > Gabriel
>      >
>      >       [[alternative HTML version deleted]]
>      >
>      > _______________________________________________
>      > R-sig-meta-analysis mailing list @
>     R-sig-meta-analysis using r-project.org
>     <mailto:R-sig-meta-analysis using r-project.org>
>      > To manage your subscription to this mailing list, go to:
>      > https://stat.ethz.ch/mailman/listinfo/r-sig-meta-analysis
>     <https://stat.ethz.ch/mailman/listinfo/r-sig-meta-analysis>
>      >
> 
>     -- 
>     Michael
>     http://www.dewey.myzen.co.uk/home.html
>     <http://www.dewey.myzen.co.uk/home.html>
> 
> 
> <http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient>	Virus-free.www.avg.com <http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient>
> 
> <#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>

-- 
Michael
http://www.dewey.myzen.co.uk/home.html



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