plots:forest_plot_with_subgroups
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | |||
plots:forest_plot_with_subgroups [2022/04/22 11:17] – Wolfgang Viechtbauer | plots:forest_plot_with_subgroups [2023/09/21 19:09] (current) – Wolfgang Viechtbauer | ||
---|---|---|---|
Line 26: | Line 26: | ||
### a little helper function to add Q-test, I^2, and tau^2 estimate info | ### a little helper function to add Q-test, I^2, and tau^2 estimate info | ||
- | mlabfun <- function(text, | + | mlabfun <- function(text, |
| | ||
- | " (Q = ", .(formatC(res$QE, digits=2, format=" | + | " (Q = ", .(fmtx(x$QE, digits=2)), |
- | ", df = ", .(res$k - res$p), | + | ", df = ", .(x$k - x$p), ", ", |
- | | + | |
- | I^2, " = ", .(formatC(res$I2, digits=1, format=" | + | I^2, " = ", .(fmtx(x$I2, digits=1)), "%, ", |
- | tau^2, " = ", .(formatC(res$tau2, digits=2, format=" | + | tau^2, " = ", .(fmtx(x$tau2, digits=2)), " |
### set up forest plot (with 2x2 table counts added; the ' | ### set up forest plot (with 2x2 table counts added; the ' | ||
Line 75: | Line 75: | ||
### add text for the test of subgroup differences | ### add text for the test of subgroup differences | ||
text(-16, -1.8, pos=4, cex=0.75, bquote(paste(" | text(-16, -1.8, pos=4, cex=0.75, bquote(paste(" | ||
- | Q[M], " = ", .(formatC(res$QM, digits=2, format=" | + | Q[M], " = ", .(fmtx(res$QM, digits=2)), |
- | ", | + | ", df = ", .(res$p - 1), ", ", |
+ | .(fmtp(res$QMp, digits=2, | ||
</ | </ | ||
plots/forest_plot_with_subgroups.txt · Last modified: 2023/09/21 19:09 by Wolfgang Viechtbauer