[R] arcsine transformation with metafor

Viechtbauer Wolfgang (STAT) wolfgang.viechtbauer at maastrichtuniversity.nl
Mon Nov 24 12:22:52 CET 2014


> -----Original Message-----
> From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org]
> On Behalf Of Antonello Preti
> Sent: Monday, November 24, 2014 00:35
> To: r-help at r-project.org
> Subject: [R] arcsine transformation with metafor
> 
> # I'm trying to adapt to my own data the double arcsine transformation
> according to Miller (1978) as described in the metafor site
> # I've understood all passages (I think)
> # I'm able to build a forest plot with the correct data
> # I would like to build a funnel plot and a radial plot
> # However, the rule that is helpful to build a forest plot does not work
> for the radial or the funnel plot
> # When I use the results of the fixed (or random) effects model, as
> expected, the estimates are wrong (about two times the correct estimates)
> # How can the radial and funnel plot be built for the double arcsine
> transformation?
> 
> # Thank you in advance, Antonello
> 
> # Here the code I've used
> 
> library(metafor)
> 
> # The data used by Miller (1978) to illustrate the transformation and its
> inversion can be re-created with:
> 
> dat <- data.frame(xi=c(3, 6, 10, 1), ni=c(11, 17, 21, 6))
> dat$pi <- with(dat, xi/ni)
> dat <- escalc(measure="PFT", xi=xi, ni=ni, data=dat)

[SNIP]

> res <- rma(yi, vi, method="FE", data=dat)

[SNIP]
 
> ### However, this is wrong
> 
> radial(res)
> funnel(res)

They are not wrong. The double arcsine transformed values are used for the plotting, not the raw proportions. In particular, the plots are based on 'yi' in:

> dat
  xi ni        pi     yi     vi
1  3 11 0.2727273 0.5695 0.0217
2  6 17 0.3529412 0.6444 0.0143
3 10 21 0.4761905 0.7626 0.0116
4  1  6 0.1666667 0.4758 0.0385

Best,
Wolfgang



More information about the R-help mailing list