Skip to content
Prev 2207 / 5636 Next

[R-meta] Adjust the scale for x-axis using forest() function in the metafor package

Dear Thao,

To be precise, you transformed the values shown on the x-axis back (through exponentiation) via the 'atransf' argument. Since exp() is a non-linear transformation, the spacing of the ticks will not be equidistant if the spacing on the log scale was equidistant to begin with (and vice-versa). Alternatively, you could use the 'transf' argument, which actually transforms all values back (not just the x-axis values that are shown). Then the spacing of the ticks will be equidistant (assuming that's how you specify the position of the ticks), but the CIs will no longer be symmetric (and appear to be of unequal widths even if the CIs are actually of equal width on the log scale). Compare:

yi <- log(c(.8, 1, 1.2, 1.4))
vi <- rep(.01, 4)
forest(yi, vi)
forest(yi, vi, atransf=exp, at=log(c(.5, 1, 1.5, 2)))
forest(yi, vi, transf=exp, at=c(.5, 1, 1.5, 2))

Best,
Wolfgang