[R-meta] escalc() function and weights

Viechtbauer, Wolfgang (SP) wo||g@ng@v|echtb@uer @end|ng |rom m@@@tr|chtun|ver@|ty@n|
Fri Jun 26 17:33:23 CEST 2020

Dear Mario,

I removed the 'formula interface' to escalc() because it did not add anything beyond what you can do with the escalc() function without that way of specifying the data. Keeping it in the package meant that I had to maintain two different but equivalent ways of specifying the data for escalc() and hence extra work for me.

So, the example where the data are specified in the 'long' format from the JSS package won't work anymore. However, one can easily restructure such a long format dataset back to a wide one with the reshape() function. So, given the dataset as shown on page 11 in the article, one could do:

dat.fm$cell <- 1:4
dat.wide <- reshape(dat.fm, direction="wide", idvar="study", timevar="cell")[c(1,4,7,10,13)]

and then use escalc():

escalc(measure="RR", ai=freq.1, bi=freq.2, ci=freq.3, di=freq.4, data=dat.wide)


>-----Original Message-----
>From: R-sig-meta-analysis [mailto:r-sig-meta-analysis-bounces using r-project.org]
>On Behalf Of Prof. Mario Petretta
>Sent: Friday, 26 June, 2020 17:17
>To: r-sig-meta-analysis using r-project.org
>Subject: [R-meta] escalc() function and weights
>Dear All,
>in a previous post (see below) it was pointed out by Wolfgang Viechtbauer
>that the use of weight in the escalc () function is deprecated.
>Please, it is possible to clarify:
>1) Why is the use of weight in the escalc () function is now deprecated?
>2) What is the correct code to use for the example of the tutorial on the
>"Metafor" package and the "escalc" function using the "long" bcg data
>obtained with the reshape2 function, as shown in the previous post ?
>Thank you for your time
>Mario Petretta
>Mario Petretta
>Professor of Internal Medicine
>Department of Translational Medical Science
>University of Naples Federico II
>Naples - Italy
>Tue, 16 Jun 2020 09:51:21 -0700
>Dear Amoatwi,
>This way of using the escalc() function has been deprecated. It might be
>added back once there is actually any benefit from having this
>functionality, but for years it just meant that I had to maintain two
>different ways of doing the exact same thing without any additional

More information about the R-sig-meta-analysis mailing list