Skip to content
Prev 2553 / 5636 Next

[R-meta] Robumeta Forest Plot

Dear Tobias,

I believe you can't. But assuming you're talking about an intercept-only
model, it is not difficult to use forest.default() and addpoly.default()
from metafor to achieve that purpose. I'm not exactly sure what your
specific needs are but assuming your fitted robu model is called x, you can
think of something along the lines of (I have not tested the following as
I'm using my phone).

You can easily turn the following into an R function or modify in any other
way to fit your situation.

Reza

d <- cbind(x$data.full, x$data, orig.nm = as.vector(x$study_orig_id))
level <- .95
y <- d$effect.size
vi <- d$var.eff.size
w <- d$r.weights
refline <- x$reg_table$b.r[[1]]
slab <- d$orig.nm
wsize  <- 1
ES.CI.L <- x$reg_table$CI.L[[1]]
ES.CI.U <- x$reg_table$CI.U[[1]]

forest.default(x = y, vi = vi, psize = wsize*(w/max(w)),
level = level,
refline = refline,
xlab = "effect size",
slab = slab,
cex = 1,
efac = 0,
mgp = c(1, .3, 0), ...)

addpoly.default(refline, ci.lb = ES.CI.L, ci.ub = ES.CI.U, mlab =
expression(bold("mean effect ("*mu*")")),
level = level, cex = .7, col = "cyan", rows = par('usr')[3], font = 2, xpd
= NA, border = "magenta")
On Wed, Dec 23, 2020 at 12:53 PM <t.saueressig at gmx.de> wrote: