Skip to content
Prev 4677 / 5636 Next

[R-meta] question on forest plot formatring

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 .
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 at dewey.myzen.co.uk>
wrote: